提交 a1ac38ab 编写于 作者: M Michael Ellerman 提交者: Benjamin Herrenschmidt

powerpc: Use pr_devel() in arch/powerpc/mm/mmu_context_nohash.c

pr_debug() can now result in code being generated even when DEBUG
is not defined. That's not really desirable in some places.

With CONFIG_DYNAMIC_DEBUG=y:

size before:
   text	   data	    bss	    dec	    hex	filename
   1508	     48	     28	   1584	    630	powerpc/mm/mmu_context_nohash.o

size after:
   text	   data	    bss	    dec	    hex	filename
   1088	      0	     28	   1116	    45c	powerpc/mm/mmu_context_nohash.o
Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 b69e9e93
...@@ -89,7 +89,7 @@ static unsigned int steal_context_smp(unsigned int id) ...@@ -89,7 +89,7 @@ static unsigned int steal_context_smp(unsigned int id)
id = first_context; id = first_context;
continue; continue;
} }
pr_debug("[%d] steal context %d from mm @%p\n", pr_devel("[%d] steal context %d from mm @%p\n",
smp_processor_id(), id, mm); smp_processor_id(), id, mm);
/* Mark this mm has having no context anymore */ /* Mark this mm has having no context anymore */
...@@ -126,7 +126,7 @@ static unsigned int steal_context_up(unsigned int id) ...@@ -126,7 +126,7 @@ static unsigned int steal_context_up(unsigned int id)
/* Pick up the victim mm */ /* Pick up the victim mm */
mm = context_mm[id]; mm = context_mm[id];
pr_debug("[%d] steal context %d from mm @%p\n", cpu, id, mm); pr_devel("[%d] steal context %d from mm @%p\n", cpu, id, mm);
/* Flush the TLB for that context */ /* Flush the TLB for that context */
local_flush_tlb_mm(mm); local_flush_tlb_mm(mm);
...@@ -180,7 +180,7 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next) ...@@ -180,7 +180,7 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next)
spin_lock(&context_lock); spin_lock(&context_lock);
#ifndef DEBUG_STEAL_ONLY #ifndef DEBUG_STEAL_ONLY
pr_debug("[%d] activating context for mm @%p, active=%d, id=%d\n", pr_devel("[%d] activating context for mm @%p, active=%d, id=%d\n",
cpu, next, next->context.active, next->context.id); cpu, next, next->context.active, next->context.id);
#endif #endif
...@@ -189,7 +189,7 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next) ...@@ -189,7 +189,7 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next)
next->context.active++; next->context.active++;
if (prev) { if (prev) {
#ifndef DEBUG_STEAL_ONLY #ifndef DEBUG_STEAL_ONLY
pr_debug(" old context %p active was: %d\n", pr_devel(" old context %p active was: %d\n",
prev, prev->context.active); prev, prev->context.active);
#endif #endif
WARN_ON(prev->context.active < 1); WARN_ON(prev->context.active < 1);
...@@ -236,7 +236,7 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next) ...@@ -236,7 +236,7 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next)
next->context.id = id; next->context.id = id;
#ifndef DEBUG_STEAL_ONLY #ifndef DEBUG_STEAL_ONLY
pr_debug("[%d] picked up new id %d, nrf is now %d\n", pr_devel("[%d] picked up new id %d, nrf is now %d\n",
cpu, id, nr_free_contexts); cpu, id, nr_free_contexts);
#endif #endif
...@@ -247,7 +247,7 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next) ...@@ -247,7 +247,7 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next)
* local TLB for it and unmark it before we use it * local TLB for it and unmark it before we use it
*/ */
if (test_bit(id, stale_map[cpu])) { if (test_bit(id, stale_map[cpu])) {
pr_debug("[%d] flushing stale context %d for mm @%p !\n", pr_devel("[%d] flushing stale context %d for mm @%p !\n",
cpu, id, next); cpu, id, next);
local_flush_tlb_mm(next); local_flush_tlb_mm(next);
...@@ -314,13 +314,13 @@ static int __cpuinit mmu_context_cpu_notify(struct notifier_block *self, ...@@ -314,13 +314,13 @@ static int __cpuinit mmu_context_cpu_notify(struct notifier_block *self,
switch (action) { switch (action) {
case CPU_ONLINE: case CPU_ONLINE:
case CPU_ONLINE_FROZEN: case CPU_ONLINE_FROZEN:
pr_debug("MMU: Allocating stale context map for CPU %d\n", cpu); pr_devel("MMU: Allocating stale context map for CPU %d\n", cpu);
stale_map[cpu] = kzalloc(CTX_MAP_SIZE, GFP_KERNEL); stale_map[cpu] = kzalloc(CTX_MAP_SIZE, GFP_KERNEL);
break; break;
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
case CPU_DEAD: case CPU_DEAD:
case CPU_DEAD_FROZEN: case CPU_DEAD_FROZEN:
pr_debug("MMU: Freeing stale context map for CPU %d\n", cpu); pr_devel("MMU: Freeing stale context map for CPU %d\n", cpu);
kfree(stale_map[cpu]); kfree(stale_map[cpu]);
stale_map[cpu] = NULL; stale_map[cpu] = NULL;
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册