Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
[pandora-kernel.git] / kernel / softlockup.c
index 492f0c7..85d5a24 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/lockdep.h>
 #include <linux/notifier.h>
 #include <linux/module.h>
+#include <linux/sysctl.h>
 
 #include <asm/irq_regs.h>
 
@@ -88,6 +89,14 @@ void touch_all_softlockup_watchdogs(void)
 }
 EXPORT_SYMBOL(touch_all_softlockup_watchdogs);
 
+int proc_dosoftlockup_thresh(struct ctl_table *table, int write,
+                            struct file *filp, void __user *buffer,
+                            size_t *lenp, loff_t *ppos)
+{
+       touch_all_softlockup_watchdogs();
+       return proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos);
+}
+
 /*
  * This callback runs from the timer interrupt, and checks
  * whether the watchdog thread has hung or not:
@@ -310,10 +319,8 @@ cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
        case CPU_DOWN_PREPARE:
        case CPU_DOWN_PREPARE_FROZEN:
                if (hotcpu == check_cpu) {
-                       cpumask_t temp_cpu_online_map = cpu_online_map;
-
-                       cpu_clear(hotcpu, temp_cpu_online_map);
-                       check_cpu = cpumask_any(&temp_cpu_online_map);
+                       /* Pick any other online cpu. */
+                       check_cpu = cpumask_any_but(cpu_online_mask, hotcpu);
                }
                break;