]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/softlockup.c
hwmon: (abituguru3) Enable reading from AUX3 fan on Abit AT8 32X
[linux-2.6-omap-h63xx.git] / kernel / softlockup.c
index 7bd8d1aadd5d3693bd881791e1130b1f603f5bce..cb838ee93a82000bc5b313271487836e9fb5804e 100644 (file)
@@ -233,7 +233,8 @@ static void check_hung_uninterruptible_tasks(int this_cpu)
        do_each_thread(g, t) {
                if (!--max_count)
                        goto unlock;
-               if (t->state & TASK_UNINTERRUPTIBLE)
+               /* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */
+               if (t->state == TASK_UNINTERRUPTIBLE)
                        check_hung_task(t, now);
        } while_each_thread(g, t);
  unlock:
@@ -338,14 +339,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);