aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/softlockup.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/softlockup.c')
-rw-r--r--kernel/softlockup.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/kernel/softlockup.c b/kernel/softlockup.c
index 1ab790c67b17..85d5a2455103 100644
--- a/kernel/softlockup.c
+++ b/kernel/softlockup.c
@@ -16,6 +16,7 @@
16#include <linux/lockdep.h> 16#include <linux/lockdep.h>
17#include <linux/notifier.h> 17#include <linux/notifier.h>
18#include <linux/module.h> 18#include <linux/module.h>
19#include <linux/sysctl.h>
19 20
20#include <asm/irq_regs.h> 21#include <asm/irq_regs.h>
21 22
@@ -88,6 +89,14 @@ void touch_all_softlockup_watchdogs(void)
88} 89}
89EXPORT_SYMBOL(touch_all_softlockup_watchdogs); 90EXPORT_SYMBOL(touch_all_softlockup_watchdogs);
90 91
92int proc_dosoftlockup_thresh(struct ctl_table *table, int write,
93 struct file *filp, void __user *buffer,
94 size_t *lenp, loff_t *ppos)
95{
96 touch_all_softlockup_watchdogs();
97 return proc_dointvec_minmax(table, write, filp, buffer, lenp, ppos);
98}
99
91/* 100/*
92 * This callback runs from the timer interrupt, and checks 101 * This callback runs from the timer interrupt, and checks
93 * whether the watchdog thread has hung or not: 102 * whether the watchdog thread has hung or not:
@@ -303,17 +312,15 @@ cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
303 break; 312 break;
304 case CPU_ONLINE: 313 case CPU_ONLINE:
305 case CPU_ONLINE_FROZEN: 314 case CPU_ONLINE_FROZEN:
306 check_cpu = any_online_cpu(cpu_online_map); 315 check_cpu = cpumask_any(cpu_online_mask);
307 wake_up_process(per_cpu(watchdog_task, hotcpu)); 316 wake_up_process(per_cpu(watchdog_task, hotcpu));
308 break; 317 break;
309#ifdef CONFIG_HOTPLUG_CPU 318#ifdef CONFIG_HOTPLUG_CPU
310 case CPU_DOWN_PREPARE: 319 case CPU_DOWN_PREPARE:
311 case CPU_DOWN_PREPARE_FROZEN: 320 case CPU_DOWN_PREPARE_FROZEN:
312 if (hotcpu == check_cpu) { 321 if (hotcpu == check_cpu) {
313 cpumask_t temp_cpu_online_map = cpu_online_map; 322 /* Pick any other online cpu. */
314 323 check_cpu = cpumask_any_but(cpu_online_mask, hotcpu);
315 cpu_clear(hotcpu, temp_cpu_online_map);
316 check_cpu = any_online_cpu(temp_cpu_online_map);
317 } 324 }
318 break; 325 break;
319 326
@@ -323,7 +330,7 @@ cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
323 break; 330 break;
324 /* Unbind so it can run. Fall thru. */ 331 /* Unbind so it can run. Fall thru. */
325 kthread_bind(per_cpu(watchdog_task, hotcpu), 332 kthread_bind(per_cpu(watchdog_task, hotcpu),
326 any_online_cpu(cpu_online_map)); 333 cpumask_any(cpu_online_mask));
327 case CPU_DEAD: 334 case CPU_DEAD:
328 case CPU_DEAD_FROZEN: 335 case CPU_DEAD_FROZEN:
329 p = per_cpu(watchdog_task, hotcpu); 336 p = per_cpu(watchdog_task, hotcpu);