]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/softlockup.c
mmc: properly iterate over sg list in debug check
[linux-2.6-omap-h63xx.git] / kernel / softlockup.c
index 7bd8d1aadd5d3693bd881791e1130b1f603f5bce..b75b492fbfcff63770bc099df2a7769fc1e26f09 100644 (file)
@@ -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);