[PARISC] clean up debugging printks in smp.c
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
This commit is contained in:
committed by
Kyle McMartin
parent
2b163b71e6
commit
5492a0f001
@@ -51,7 +51,15 @@
|
|||||||
#include <asm/unistd.h>
|
#include <asm/unistd.h>
|
||||||
#include <asm/cacheflush.h>
|
#include <asm/cacheflush.h>
|
||||||
|
|
||||||
#define kDEBUG 0
|
#undef DEBUG_SMP
|
||||||
|
#ifdef DEBUG_SMP
|
||||||
|
static int smp_debug_lvl = 0;
|
||||||
|
#define smp_debug(lvl, printargs...) \
|
||||||
|
if (lvl >= smp_debug_lvl) \
|
||||||
|
printk(printargs);
|
||||||
|
#else
|
||||||
|
#define smp_debug(lvl, ...)
|
||||||
|
#endif /* DEBUG_SMP */
|
||||||
|
|
||||||
DEFINE_SPINLOCK(smp_lock);
|
DEFINE_SPINLOCK(smp_lock);
|
||||||
|
|
||||||
@@ -186,15 +194,11 @@ ipi_interrupt(int irq, void *dev_id)
|
|||||||
|
|
||||||
switch (which) {
|
switch (which) {
|
||||||
case IPI_NOP:
|
case IPI_NOP:
|
||||||
#if (kDEBUG>=100)
|
smp_debug(100, KERN_DEBUG "CPU%d IPI_NOP\n", this_cpu);
|
||||||
printk(KERN_DEBUG "CPU%d IPI_NOP\n",this_cpu);
|
|
||||||
#endif /* kDEBUG */
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IPI_RESCHEDULE:
|
case IPI_RESCHEDULE:
|
||||||
#if (kDEBUG>=100)
|
smp_debug(100, KERN_DEBUG "CPU%d IPI_RESCHEDULE\n", this_cpu);
|
||||||
printk(KERN_DEBUG "CPU%d IPI_RESCHEDULE\n",this_cpu);
|
|
||||||
#endif /* kDEBUG */
|
|
||||||
/*
|
/*
|
||||||
* Reschedule callback. Everything to be
|
* Reschedule callback. Everything to be
|
||||||
* done is done by the interrupt return path.
|
* done is done by the interrupt return path.
|
||||||
@@ -202,9 +206,7 @@ ipi_interrupt(int irq, void *dev_id)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case IPI_CALL_FUNC:
|
case IPI_CALL_FUNC:
|
||||||
#if (kDEBUG>=100)
|
smp_debug(100, KERN_DEBUG "CPU%d IPI_CALL_FUNC\n", this_cpu);
|
||||||
printk(KERN_DEBUG "CPU%d IPI_CALL_FUNC\n",this_cpu);
|
|
||||||
#endif /* kDEBUG */
|
|
||||||
{
|
{
|
||||||
volatile struct smp_call_struct *data;
|
volatile struct smp_call_struct *data;
|
||||||
void (*func)(void *info);
|
void (*func)(void *info);
|
||||||
@@ -235,18 +237,14 @@ ipi_interrupt(int irq, void *dev_id)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case IPI_CPU_START:
|
case IPI_CPU_START:
|
||||||
#if (kDEBUG>=100)
|
smp_debug(100, KERN_DEBUG "CPU%d IPI_CPU_START\n", this_cpu);
|
||||||
printk(KERN_DEBUG "CPU%d IPI_CPU_START\n",this_cpu);
|
|
||||||
#endif /* kDEBUG */
|
|
||||||
#ifdef ENTRY_SYS_CPUS
|
#ifdef ENTRY_SYS_CPUS
|
||||||
p->state = STATE_RUNNING;
|
p->state = STATE_RUNNING;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IPI_CPU_STOP:
|
case IPI_CPU_STOP:
|
||||||
#if (kDEBUG>=100)
|
smp_debug(100, KERN_DEBUG "CPU%d IPI_CPU_STOP\n", this_cpu);
|
||||||
printk(KERN_DEBUG "CPU%d IPI_CPU_STOP\n",this_cpu);
|
|
||||||
#endif /* kDEBUG */
|
|
||||||
#ifdef ENTRY_SYS_CPUS
|
#ifdef ENTRY_SYS_CPUS
|
||||||
#else
|
#else
|
||||||
halt_processor();
|
halt_processor();
|
||||||
@@ -254,9 +252,7 @@ ipi_interrupt(int irq, void *dev_id)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case IPI_CPU_TEST:
|
case IPI_CPU_TEST:
|
||||||
#if (kDEBUG>=100)
|
smp_debug(100, KERN_DEBUG "CPU%d is alive!\n", this_cpu);
|
||||||
printk(KERN_DEBUG "CPU%d is alive!\n",this_cpu);
|
|
||||||
#endif /* kDEBUG */
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -563,10 +559,8 @@ int __init smp_boot_one_cpu(int cpuid)
|
|||||||
|
|
||||||
alive:
|
alive:
|
||||||
/* Remember the Slave data */
|
/* Remember the Slave data */
|
||||||
#if (kDEBUG>=100)
|
smp_debug(100, KERN_DEBUG "SMP: CPU:%d came alive after %ld _us\n",
|
||||||
printk(KERN_DEBUG "SMP: CPU:%d came alive after %ld _us\n",
|
|
||||||
cpuid, timeout * 100);
|
cpuid, timeout * 100);
|
||||||
#endif /* kDEBUG */
|
|
||||||
#ifdef ENTRY_SYS_CPUS
|
#ifdef ENTRY_SYS_CPUS
|
||||||
cpu_data[cpuid].state = STATE_RUNNING;
|
cpu_data[cpuid].state = STATE_RUNNING;
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user