[PATCH] [POWERPC] Silence an annoying boot message

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE6874d

5 messages, 3 authors, 2007-11-13 · open the first message on its own page

[PATCH] [POWERPC] Silence an annoying boot message

From: Stephen Rothwell <hidden>
Date: 2007-11-12 02:53:34

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.

Signed-off-by: Stephen Rothwell <redacted>
---
 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?

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index d9c82d3..ee0e0cc 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -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,
-- 
1.5.3.5

Re: [PATCH] [POWERPC] Silence an annoying boot message

From: Olof Johansson <hidden>
Date: 2007-11-12 05:14:55

Hi Stephen,

On Mon, Nov 12, 2007 at 01:53:39PM +1100, Stephen Rothwell wrote:
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.
[...]
quoted hunk
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index d9c82d3..ee0e0cc 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -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

Re: [PATCH] [POWERPC] Silence an annoying boot message

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2007-11-12 08:52:57

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

[PATCH] [POWERPC] Silence an annoying boot message

From: Stephen Rothwell <hidden>
Date: 2007-11-13 04:41:44

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.

Signed-off-by: Stephen Rothwell <redacted>
---
 arch/powerpc/mm/init_64.c |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index d9c82d3..c0f5cff 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -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,
-- 
1.5.3.5

Re: [PATCH] [POWERPC] Silence an annoying boot message

From: Olof Johansson <hidden>
Date: 2007-11-13 04:50:46

On Tue, Nov 13, 2007 at 03:41:49PM +1100, Stephen Rothwell wrote:
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.

Signed-off-by: Stephen Rothwell <redacted>
Acked-by: Olof Johansson <redacted>


-Olof
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help