X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=kernel%2Fsoftlockup.c;h=50afeb813305d76435e8c6852a80b5b9dc5c8cd9;hb=4447d35156169cf136e829eb6b5cac2d6370f2d9;hp=6b76caa229818811f61aaacf16afd9c2b6da5dc5;hpb=8f7c58814eb75bf97b8bc18d107b2e26f28b6585;p=powerpc.git diff --git a/kernel/softlockup.c b/kernel/softlockup.c index 6b76caa229..50afeb8133 100644 --- a/kernel/softlockup.c +++ b/kernel/softlockup.c @@ -104,7 +104,7 @@ static int watchdog(void * __bind_cpu) /* * Create/destroy watchdog threads as CPUs come and go: */ -static int __devinit +static int __cpuinit cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) { int hotcpu = (unsigned long)hcpu; @@ -142,15 +142,16 @@ cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) return NOTIFY_OK; } -static struct notifier_block __devinitdata cpu_nfb = { +static struct notifier_block __cpuinitdata cpu_nfb = { .notifier_call = cpu_callback }; __init void spawn_softlockup_task(void) { void *cpu = (void *)(long)smp_processor_id(); + int err = cpu_callback(&cpu_nfb, CPU_UP_PREPARE, cpu); - cpu_callback(&cpu_nfb, CPU_UP_PREPARE, cpu); + BUG_ON(err == NOTIFY_BAD); cpu_callback(&cpu_nfb, CPU_ONLINE, cpu); register_cpu_notifier(&cpu_nfb);