aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/watchdog.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-09-09 14:40:06 -0400
committerIngo Molnar <mingo@elte.hu>2010-09-09 14:40:08 -0400
commit2aa61274efb9f532deaebc9812675a27af1994cb (patch)
treec2f70525dc152e0ddce60f1a3021473cc6a3f298 /kernel/watchdog.c
parent359d5106a2ff4ffa2ba129ec8f54743c341dabfc (diff)
parent5e11637e2c929e34dcc0fbbfb48bdb638937701a (diff)
Merge branch 'perf/urgent' into perf/core
Merge reason: Pick up pending fixes before applying dependent new changes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/watchdog.c')
-rw-r--r--kernel/watchdog.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 5b1ee4f4ca0d..fa71aebda4ff 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -121,7 +121,7 @@ static void __touch_watchdog(void)
121 121
122void touch_softlockup_watchdog(void) 122void touch_softlockup_watchdog(void)
123{ 123{
124 __get_cpu_var(watchdog_touch_ts) = 0; 124 __raw_get_cpu_var(watchdog_touch_ts) = 0;
125} 125}
126EXPORT_SYMBOL(touch_softlockup_watchdog); 126EXPORT_SYMBOL(touch_softlockup_watchdog);
127 127
@@ -141,7 +141,14 @@ void touch_all_softlockup_watchdogs(void)
141#ifdef CONFIG_HARDLOCKUP_DETECTOR 141#ifdef CONFIG_HARDLOCKUP_DETECTOR
142void touch_nmi_watchdog(void) 142void touch_nmi_watchdog(void)
143{ 143{
144 __get_cpu_var(watchdog_nmi_touch) = true; 144 if (watchdog_enabled) {
145 unsigned cpu;
146
147 for_each_present_cpu(cpu) {
148 if (per_cpu(watchdog_nmi_touch, cpu) != true)
149 per_cpu(watchdog_nmi_touch, cpu) = true;
150 }
151 }
145 touch_softlockup_watchdog(); 152 touch_softlockup_watchdog();
146} 153}
147EXPORT_SYMBOL(touch_nmi_watchdog); 154EXPORT_SYMBOL(touch_nmi_watchdog);
@@ -422,6 +429,9 @@ static int watchdog_enable(int cpu)
422 wake_up_process(p); 429 wake_up_process(p);
423 } 430 }
424 431
432 /* if any cpu succeeds, watchdog is considered enabled for the system */
433 watchdog_enabled = 1;
434
425 return 0; 435 return 0;
426} 436}
427 437
@@ -444,9 +454,6 @@ static void watchdog_disable(int cpu)
444 per_cpu(softlockup_watchdog, cpu) = NULL; 454 per_cpu(softlockup_watchdog, cpu) = NULL;
445 kthread_stop(p); 455 kthread_stop(p);
446 } 456 }
447
448 /* if any cpu succeeds, watchdog is considered enabled for the system */
449 watchdog_enabled = 1;
450} 457}
451 458
452static void watchdog_enable_all_cpus(void) 459static void watchdog_enable_all_cpus(void)