aboutsummaryrefslogtreecommitdiff
path: root/kernel/watchdog.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-09-13 01:02:18 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-13 01:02:18 +0100
commit9277bf4b4f94655eef177d0daffa90a47c51eb62 (patch)
tree569b5a13b3f7030a603460d8d9ded035a6f7f48f /kernel/watchdog.c
parent897493504addc5609f04a2c4f73c37ab972c29b2 (diff)
parent49553c2ef88749dd502687f4eb9c258bb10a4f44 (diff)
Merge remote branch 'linus' into drm-intel-fixes
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 0d53c8e853b..7f9c3c52ecc 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -122,7 +122,7 @@ static void __touch_watchdog(void)
void touch_softlockup_watchdog(void)
{
- __get_cpu_var(watchdog_touch_ts) = 0;
+ __raw_get_cpu_var(watchdog_touch_ts) = 0;
}
EXPORT_SYMBOL(touch_softlockup_watchdog);
@@ -142,7 +142,14 @@ void touch_all_softlockup_watchdogs(void)
#ifdef CONFIG_HARDLOCKUP_DETECTOR
void touch_nmi_watchdog(void)
{
- __get_cpu_var(watchdog_nmi_touch) = true;
+ if (watchdog_enabled) {
+ unsigned cpu;
+
+ for_each_present_cpu(cpu) {
+ if (per_cpu(watchdog_nmi_touch, cpu) != true)
+ per_cpu(watchdog_nmi_touch, cpu) = true;
+ }
+ }
touch_softlockup_watchdog();
}
EXPORT_SYMBOL(touch_nmi_watchdog);
@@ -433,6 +440,9 @@ static int watchdog_enable(int cpu)
wake_up_process(p);
}
+ /* if any cpu succeeds, watchdog is considered enabled for the system */
+ watchdog_enabled = 1;
+
return 0;
}
@@ -455,9 +465,6 @@ static void watchdog_disable(int cpu)
per_cpu(softlockup_watchdog, cpu) = NULL;
kthread_stop(p);
}
-
- /* if any cpu succeeds, watchdog is considered enabled for the system */
- watchdog_enabled = 1;
}
static void watchdog_enable_all_cpus(void)