|
@@ -338,14 +338,33 @@ static struct notifier_block __cpuinitdata cpu_nfb = {
|
|
|
.notifier_call = cpu_callback
|
|
|
};
|
|
|
|
|
|
-__init void spawn_softlockup_task(void)
|
|
|
+static int __initdata nosoftlockup;
|
|
|
+
|
|
|
+static int __init nosoftlockup_setup(char *str)
|
|
|
+{
|
|
|
+ nosoftlockup = 1;
|
|
|
+ return 1;
|
|
|
+}
|
|
|
+__setup("nosoftlockup", nosoftlockup_setup);
|
|
|
+
|
|
|
+static int __init spawn_softlockup_task(void)
|
|
|
{
|
|
|
void *cpu = (void *)(long)smp_processor_id();
|
|
|
- int err = cpu_callback(&cpu_nfb, CPU_UP_PREPARE, cpu);
|
|
|
+ int err;
|
|
|
|
|
|
- BUG_ON(err == NOTIFY_BAD);
|
|
|
+ if (nosoftlockup)
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ err = cpu_callback(&cpu_nfb, CPU_UP_PREPARE, cpu);
|
|
|
+ if (err == NOTIFY_BAD) {
|
|
|
+ BUG();
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
cpu_callback(&cpu_nfb, CPU_ONLINE, cpu);
|
|
|
register_cpu_notifier(&cpu_nfb);
|
|
|
|
|
|
atomic_notifier_chain_register(&panic_notifier_list, &panic_block);
|
|
|
+
|
|
|
+ return 0;
|
|
|
}
|
|
|
+early_initcall(spawn_softlockup_task);
|