diff options
Diffstat (limited to 'kernel/softlockup.c')
| -rw-r--r-- | kernel/softlockup.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/kernel/softlockup.c b/kernel/softlockup.c index 7bd8d1aadd5d..b75b492fbfcf 100644 --- a/kernel/softlockup.c +++ b/kernel/softlockup.c | |||
| @@ -338,14 +338,33 @@ static struct notifier_block __cpuinitdata cpu_nfb = { | |||
| 338 | .notifier_call = cpu_callback | 338 | .notifier_call = cpu_callback |
| 339 | }; | 339 | }; |
| 340 | 340 | ||
| 341 | __init void spawn_softlockup_task(void) | 341 | static int __initdata nosoftlockup; |
| 342 | |||
| 343 | static int __init nosoftlockup_setup(char *str) | ||
| 344 | { | ||
| 345 | nosoftlockup = 1; | ||
| 346 | return 1; | ||
| 347 | } | ||
| 348 | __setup("nosoftlockup", nosoftlockup_setup); | ||
| 349 | |||
| 350 | static int __init spawn_softlockup_task(void) | ||
| 342 | { | 351 | { |
| 343 | void *cpu = (void *)(long)smp_processor_id(); | 352 | void *cpu = (void *)(long)smp_processor_id(); |
| 344 | int err = cpu_callback(&cpu_nfb, CPU_UP_PREPARE, cpu); | 353 | int err; |
| 345 | 354 | ||
| 346 | BUG_ON(err == NOTIFY_BAD); | 355 | if (nosoftlockup) |
| 356 | return 0; | ||
| 357 | |||
| 358 | err = cpu_callback(&cpu_nfb, CPU_UP_PREPARE, cpu); | ||
| 359 | if (err == NOTIFY_BAD) { | ||
| 360 | BUG(); | ||
| 361 | return 1; | ||
| 362 | } | ||
| 347 | cpu_callback(&cpu_nfb, CPU_ONLINE, cpu); | 363 | cpu_callback(&cpu_nfb, CPU_ONLINE, cpu); |
| 348 | register_cpu_notifier(&cpu_nfb); | 364 | register_cpu_notifier(&cpu_nfb); |
| 349 | 365 | ||
| 350 | atomic_notifier_chain_register(&panic_notifier_list, &panic_block); | 366 | atomic_notifier_chain_register(&panic_notifier_list, &panic_block); |
| 367 | |||
| 368 | return 0; | ||
| 351 | } | 369 | } |
| 370 | early_initcall(spawn_softlockup_task); | ||
