Commit 7a82ca0d authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

mm/debug.c: use pr_emerg()

- s/KERN_ALERT/pr_emerg/: we're going BUG so let's maximize the changes
  of getting the message out.

- convert debug.c to pr_foo()

Cc: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 96dad67f
...@@ -57,7 +57,7 @@ static void dump_flags(unsigned long flags, ...@@ -57,7 +57,7 @@ static void dump_flags(unsigned long flags,
unsigned long mask; unsigned long mask;
int i; int i;
printk(KERN_ALERT "flags: %#lx(", flags); pr_emerg("flags: %#lx(", flags);
/* remove zone id */ /* remove zone id */
flags &= (1UL << NR_PAGEFLAGS) - 1; flags &= (1UL << NR_PAGEFLAGS) - 1;
...@@ -69,22 +69,21 @@ static void dump_flags(unsigned long flags, ...@@ -69,22 +69,21 @@ static void dump_flags(unsigned long flags,
continue; continue;
flags &= ~mask; flags &= ~mask;
printk("%s%s", delim, names[i].name); pr_cont("%s%s", delim, names[i].name);
delim = "|"; delim = "|";
} }
/* check for left over flags */ /* check for left over flags */
if (flags) if (flags)
printk("%s%#lx", delim, flags); pr_cont("%s%#lx", delim, flags);
printk(")\n"); pr_cont(")\n");
} }
void dump_page_badflags(struct page *page, const char *reason, void dump_page_badflags(struct page *page, const char *reason,
unsigned long badflags) unsigned long badflags)
{ {
printk(KERN_ALERT pr_emerg("page:%p count:%d mapcount:%d mapping:%p index:%#lx\n",
"page:%p count:%d mapcount:%d mapping:%p index:%#lx\n",
page, atomic_read(&page->_count), page_mapcount(page), page, atomic_read(&page->_count), page_mapcount(page),
page->mapping, page->index); page->mapping, page->index);
BUILD_BUG_ON(ARRAY_SIZE(pageflag_names) != __NR_PAGEFLAGS); BUILD_BUG_ON(ARRAY_SIZE(pageflag_names) != __NR_PAGEFLAGS);
...@@ -152,8 +151,7 @@ static const struct trace_print_flags vmaflags_names[] = { ...@@ -152,8 +151,7 @@ static const struct trace_print_flags vmaflags_names[] = {
void dump_vma(const struct vm_area_struct *vma) void dump_vma(const struct vm_area_struct *vma)
{ {
printk(KERN_ALERT pr_emerg("vma %p start %p end %p\n"
"vma %p start %p end %p\n"
"next %p prev %p mm %p\n" "next %p prev %p mm %p\n"
"prot %lx anon_vma %p vm_ops %p\n" "prot %lx anon_vma %p vm_ops %p\n"
"pgoff %lx file %p private_data %p\n", "pgoff %lx file %p private_data %p\n",
...@@ -168,8 +166,7 @@ EXPORT_SYMBOL(dump_vma); ...@@ -168,8 +166,7 @@ EXPORT_SYMBOL(dump_vma);
void dump_mm(const struct mm_struct *mm) void dump_mm(const struct mm_struct *mm)
{ {
printk(KERN_ALERT pr_emerg("mm %p mmap %p seqnum %d task_size %lu\n"
"mm %p mmap %p seqnum %d task_size %lu\n"
#ifdef CONFIG_MMU #ifdef CONFIG_MMU
"get_unmapped_area %p\n" "get_unmapped_area %p\n"
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment