Skip to contentSkip to conversation

Silence an annoying boot message

PATCH In review Stephen Rothwell 3 participants 5 messages Nov 12, 2007 – Nov 13, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Silence an annoying boot message

vmemmap_populate will printk (with KERN_WARNING) for a lot of pages if CONFIG_SPARSEMEM_VMEMMAP is enabled (at least it does on iSeries). Turn it into a DEBUG message.

---
 arch/powerpc/mm/init_64.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Without this patch, all the messages before this one are purged from the console buffer. Is this really a warning?

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
arch/powerpc/mm/init_64.c +1 -1
index d9c82d3..ee0e0cc 100644
@@ -239,7 +239,7 @@ int __meminit vmemmap_populate(struct page *start_page,
 		if (!p)
 			return -ENOMEM;
 
-		printk(KERN_WARNING "vmemmap %08lx allocated at %p, "
+		DBG(KERN_DEBUG "vmemmap %08lx allocated at %p, "
 		                    "physical %08lx.\n", start, p, __pa(p));
 
 		mapped = htab_bolt_mapping(start, start + page_size,
Signature · 1 line
1.5.3.5
#1 lore raw

Hi Stephen,

Quoted 3 lines · Stephen Rothwell

vmemmap_populate will printk (with KERN_WARNING) for a lot of pages if CONFIG_SPARSEMEM_VMEMMAP is enabled (at least it does on iSeries). Turn it into a DEBUG message.

[...]

arch/powerpc/mm/init_64.c int __meminit vmemmap_populate(struct page *start_page, · line 243

Quoted 11 lines
arch/powerpc/mm/init_64.c +1 -1
index d9c82d3..ee0e0cc 100644
@@ -239,7 +239,7 @@ int __meminit vmemmap_populate(struct page *start_page,
 		if (!p)
 			return -ENOMEM;
 
-		printk(KERN_WARNING "vmemmap %08lx allocated at %p, "
+		DBG(KERN_DEBUG "vmemmap %08lx allocated at %p, "
 		                    "physical %08lx.\n", start, p, __pa(p));

Please use pr_debug() instead.

Feel free to change the only other DBG() user in the file as well, and take out the define of it

-Olof

#2 lore raw
Quoted 5 lines

Please use pr_debug() instead.

Feel free to change the only other DBG() user in the file as well, and take out the define of it

And for those who wonder where those DBG() come from, it's mostly me, from a time when either pr_debug wasn't around, or because I wanted to hook it to udbg_printf or other low level facilities before we had early debug console.

There is no good reason to keep those around nowadays except bad habit :-)

Cheers,
Ben

#3 lore raw

PATCH 1/1 Silence an annoying boot message

vmemmap_populate will printk (with KERN_WARNING) for a lot of pages if CONFIG_SPARSEMEM_VMEMMAP is enabled (at least it does on iSeries). Use pr_debug for it instead.

Replace the only other use of DBG in this file with pr_debug as well.

---
 arch/powerpc/mm/init_64.c |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)
Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
arch/powerpc/mm/init_64.c +4 -12
index d9c82d3..c0f5cff 100644
@@ -19,8 +19,6 @@
  *
  */
 
-#undef DEBUG
-
 #include <linux/signal.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
@@ -66,12 +64,6 @@
 
 #include "mmu_decl.h"
 
-#ifdef DEBUG
-#define DBG(fmt...) printk(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
 #if PGTABLE_RANGE > USER_VSID_RANGE
 #warning Limited user VSID range means pagetable space is wasted
 #endif
@@ -175,8 +167,8 @@ void pgtable_cache_init(void)
 		int size = pgtable_cache_size[i];
 		const char *name = pgtable_cache_name[i];
 
-		DBG("Allocating page table cache %s (#%d) "
-		    "for size: %08x...\n", name, i, size);
+		pr_debug("Allocating page table cache %s (#%d) "
+			"for size: %08x...\n", name, i, size);
 		pgtable_cache[i] = kmem_cache_create(name,
 						     size, size,
 						     SLAB_PANIC,
@@ -239,8 +231,8 @@ int __meminit vmemmap_populate(struct page *start_page,
 		if (!p)
 			return -ENOMEM;
 
-		printk(KERN_WARNING "vmemmap %08lx allocated at %p, "
-		                    "physical %08lx.\n", start, p, __pa(p));
+		pr_debug("vmemmap %08lx allocated at %p, physical %08lx.\n",
+			start, p, __pa(p));
 
 		mapped = htab_bolt_mapping(start, start + page_size,
 					__pa(p), mode_rw, mmu_linear_psize,
Signature · 1 line
1.5.3.5