aboutsummaryrefslogtreecommitdiffstats
path: root/mm/debug.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2014-10-09 18:28:41 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-09 22:25:59 -0400
commit7a82ca0d6437261d0727ce472ae4f3a05a9ce5f7 (patch)
tree6c524997b7f7042cfc7f01888ff8d6946d4358ff /mm/debug.c
parent96dad67ff244e797c4bc3e4f7f0fdaa0cfdf0a7d (diff)
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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/debug.c')
-rw-r--r--mm/debug.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/mm/debug.c b/mm/debug.c
index 5a1b6194089c..5ce45c9a29b5 100644
--- a/mm/debug.c
+++ b/mm/debug.c
@@ -57,7 +57,7 @@ static void dump_flags(unsigned long flags,
57 unsigned long mask; 57 unsigned long mask;
58 int i; 58 int i;
59 59
60 printk(KERN_ALERT "flags: %#lx(", flags); 60 pr_emerg("flags: %#lx(", flags);
61 61
62 /* remove zone id */ 62 /* remove zone id */
63 flags &= (1UL << NR_PAGEFLAGS) - 1; 63 flags &= (1UL << NR_PAGEFLAGS) - 1;
@@ -69,24 +69,23 @@ static void dump_flags(unsigned long flags,
69 continue; 69 continue;
70 70
71 flags &= ~mask; 71 flags &= ~mask;
72 printk("%s%s", delim, names[i].name); 72 pr_cont("%s%s", delim, names[i].name);
73 delim = "|"; 73 delim = "|";
74 } 74 }
75 75
76 /* check for left over flags */ 76 /* check for left over flags */
77 if (flags) 77 if (flags)
78 printk("%s%#lx", delim, flags); 78 pr_cont("%s%#lx", delim, flags);
79 79
80 printk(")\n"); 80 pr_cont(")\n");
81} 81}
82 82
83void dump_page_badflags(struct page *page, const char *reason, 83void dump_page_badflags(struct page *page, const char *reason,
84 unsigned long badflags) 84 unsigned long badflags)
85{ 85{
86 printk(KERN_ALERT 86 pr_emerg("page:%p count:%d mapcount:%d mapping:%p index:%#lx\n",
87 "page:%p count:%d mapcount:%d mapping:%p index:%#lx\n", 87 page, atomic_read(&page->_count), page_mapcount(page),
88 page, atomic_read(&page->_count), page_mapcount(page), 88 page->mapping, page->index);
89 page->mapping, page->index);
90 BUILD_BUG_ON(ARRAY_SIZE(pageflag_names) != __NR_PAGEFLAGS); 89 BUILD_BUG_ON(ARRAY_SIZE(pageflag_names) != __NR_PAGEFLAGS);
91 dump_flags(page->flags, pageflag_names, ARRAY_SIZE(pageflag_names)); 90 dump_flags(page->flags, pageflag_names, ARRAY_SIZE(pageflag_names));
92 if (reason) 91 if (reason)
@@ -152,8 +151,7 @@ static const struct trace_print_flags vmaflags_names[] = {
152 151
153void dump_vma(const struct vm_area_struct *vma) 152void dump_vma(const struct vm_area_struct *vma)
154{ 153{
155 printk(KERN_ALERT 154 pr_emerg("vma %p start %p end %p\n"
156 "vma %p start %p end %p\n"
157 "next %p prev %p mm %p\n" 155 "next %p prev %p mm %p\n"
158 "prot %lx anon_vma %p vm_ops %p\n" 156 "prot %lx anon_vma %p vm_ops %p\n"
159 "pgoff %lx file %p private_data %p\n", 157 "pgoff %lx file %p private_data %p\n",
@@ -168,8 +166,7 @@ EXPORT_SYMBOL(dump_vma);
168 166
169void dump_mm(const struct mm_struct *mm) 167void dump_mm(const struct mm_struct *mm)
170{ 168{
171 printk(KERN_ALERT 169 pr_emerg("mm %p mmap %p seqnum %d task_size %lu\n"
172 "mm %p mmap %p seqnum %d task_size %lu\n"
173#ifdef CONFIG_MMU 170#ifdef CONFIG_MMU
174 "get_unmapped_area %p\n" 171 "get_unmapped_area %p\n"
175#endif 172#endif