aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorKyle McMartin <kyle@parisc-linux.org>2007-01-15 12:23:03 -0500
committerKyle McMartin <kyle@athena.road.mcmartin.ca>2007-02-17 01:11:14 -0500
commit5492a0f001bdf5435318edb0a68eab5f16995bff (patch)
treebd7e629cf4167198c6a457be2ce236648ef66d85 /arch/parisc
parent2b163b71e6d4471cae74037cb680e885eafc8d64 (diff)
[PARISC] clean up debugging printks in smp.c
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/kernel/smp.c38
1 files changed, 16 insertions, 22 deletions
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index 3b67d115fb0..a5a730cea0f 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -51,7 +51,15 @@
51#include <asm/unistd.h> 51#include <asm/unistd.h>
52#include <asm/cacheflush.h> 52#include <asm/cacheflush.h>
53 53
54#define kDEBUG 0 54#undef DEBUG_SMP
55#ifdef DEBUG_SMP
56static int smp_debug_lvl = 0;
57#define smp_debug(lvl, printargs...) \
58 if (lvl >= smp_debug_lvl) \
59 printk(printargs);
60#else
61#define smp_debug(lvl, ...)
62#endif /* DEBUG_SMP */
55 63
56DEFINE_SPINLOCK(smp_lock); 64DEFINE_SPINLOCK(smp_lock);
57 65
@@ -186,15 +194,11 @@ ipi_interrupt(int irq, void *dev_id)
186 194
187 switch (which) { 195 switch (which) {
188 case IPI_NOP: 196 case IPI_NOP:
189#if (kDEBUG>=100) 197 smp_debug(100, KERN_DEBUG "CPU%d IPI_NOP\n", this_cpu);
190 printk(KERN_DEBUG "CPU%d IPI_NOP\n",this_cpu);
191#endif /* kDEBUG */
192 break; 198 break;
193 199
194 case IPI_RESCHEDULE: 200 case IPI_RESCHEDULE:
195#if (kDEBUG>=100) 201 smp_debug(100, KERN_DEBUG "CPU%d IPI_RESCHEDULE\n", this_cpu);
196 printk(KERN_DEBUG "CPU%d IPI_RESCHEDULE\n",this_cpu);
197#endif /* kDEBUG */
198 /* 202 /*
199 * Reschedule callback. Everything to be 203 * Reschedule callback. Everything to be
200 * done is done by the interrupt return path. 204 * done is done by the interrupt return path.
@@ -202,9 +206,7 @@ ipi_interrupt(int irq, void *dev_id)
202 break; 206 break;
203 207
204 case IPI_CALL_FUNC: 208 case IPI_CALL_FUNC:
205#if (kDEBUG>=100) 209 smp_debug(100, KERN_DEBUG "CPU%d IPI_CALL_FUNC\n", this_cpu);
206 printk(KERN_DEBUG "CPU%d IPI_CALL_FUNC\n",this_cpu);
207#endif /* kDEBUG */
208 { 210 {
209 volatile struct smp_call_struct *data; 211 volatile struct smp_call_struct *data;
210 void (*func)(void *info); 212 void (*func)(void *info);
@@ -235,18 +237,14 @@ ipi_interrupt(int irq, void *dev_id)
235 break; 237 break;
236 238
237 case IPI_CPU_START: 239 case IPI_CPU_START:
238#if (kDEBUG>=100) 240 smp_debug(100, KERN_DEBUG "CPU%d IPI_CPU_START\n", this_cpu);
239 printk(KERN_DEBUG "CPU%d IPI_CPU_START\n",this_cpu);
240#endif /* kDEBUG */
241#ifdef ENTRY_SYS_CPUS 241#ifdef ENTRY_SYS_CPUS
242 p->state = STATE_RUNNING; 242 p->state = STATE_RUNNING;
243#endif 243#endif
244 break; 244 break;
245 245
246 case IPI_CPU_STOP: 246 case IPI_CPU_STOP:
247#if (kDEBUG>=100) 247 smp_debug(100, KERN_DEBUG "CPU%d IPI_CPU_STOP\n", this_cpu);
248 printk(KERN_DEBUG "CPU%d IPI_CPU_STOP\n",this_cpu);
249#endif /* kDEBUG */
250#ifdef ENTRY_SYS_CPUS 248#ifdef ENTRY_SYS_CPUS
251#else 249#else
252 halt_processor(); 250 halt_processor();
@@ -254,9 +252,7 @@ ipi_interrupt(int irq, void *dev_id)
254 break; 252 break;
255 253
256 case IPI_CPU_TEST: 254 case IPI_CPU_TEST:
257#if (kDEBUG>=100) 255 smp_debug(100, KERN_DEBUG "CPU%d is alive!\n", this_cpu);
258 printk(KERN_DEBUG "CPU%d is alive!\n",this_cpu);
259#endif /* kDEBUG */
260 break; 256 break;
261 257
262 default: 258 default:
@@ -563,10 +559,8 @@ int __init smp_boot_one_cpu(int cpuid)
563 559
564alive: 560alive:
565 /* Remember the Slave data */ 561 /* Remember the Slave data */
566#if (kDEBUG>=100) 562 smp_debug(100, KERN_DEBUG "SMP: CPU:%d came alive after %ld _us\n",
567 printk(KERN_DEBUG "SMP: CPU:%d came alive after %ld _us\n",
568 cpuid, timeout * 100); 563 cpuid, timeout * 100);
569#endif /* kDEBUG */
570#ifdef ENTRY_SYS_CPUS 564#ifdef ENTRY_SYS_CPUS
571 cpu_data[cpuid].state = STATE_RUNNING; 565 cpu_data[cpuid].state = STATE_RUNNING;
572#endif 566#endif