aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/watchdog.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/watchdog.c')
-rw-r--r--kernel/watchdog.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 4431610f049a..e90089fd78e0 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -158,14 +158,14 @@ void touch_all_softlockup_watchdogs(void)
158#ifdef CONFIG_HARDLOCKUP_DETECTOR 158#ifdef CONFIG_HARDLOCKUP_DETECTOR
159void touch_nmi_watchdog(void) 159void touch_nmi_watchdog(void)
160{ 160{
161 if (watchdog_user_enabled) { 161 /*
162 unsigned cpu; 162 * Using __raw here because some code paths have
163 163 * preemption enabled. If preemption is enabled
164 for_each_present_cpu(cpu) { 164 * then interrupts should be enabled too, in which
165 if (per_cpu(watchdog_nmi_touch, cpu) != true) 165 * case we shouldn't have to worry about the watchdog
166 per_cpu(watchdog_nmi_touch, cpu) = true; 166 * going off.
167 } 167 */
168 } 168 __raw_get_cpu_var(watchdog_nmi_touch) = true;
169 touch_softlockup_watchdog(); 169 touch_softlockup_watchdog();
170} 170}
171EXPORT_SYMBOL(touch_nmi_watchdog); 171EXPORT_SYMBOL(touch_nmi_watchdog);
@@ -505,7 +505,6 @@ static void restart_watchdog_hrtimer(void *info)
505 505
506static void update_timers(int cpu) 506static void update_timers(int cpu)
507{ 507{
508 struct call_single_data data = {.func = restart_watchdog_hrtimer};
509 /* 508 /*
510 * Make sure that perf event counter will adopt to a new 509 * Make sure that perf event counter will adopt to a new
511 * sampling period. Updating the sampling period directly would 510 * sampling period. Updating the sampling period directly would
@@ -515,7 +514,7 @@ static void update_timers(int cpu)
515 * might be late already so we have to restart the timer as well. 514 * might be late already so we have to restart the timer as well.
516 */ 515 */
517 watchdog_nmi_disable(cpu); 516 watchdog_nmi_disable(cpu);
518 __smp_call_function_single(cpu, &data, 1); 517 smp_call_function_single(cpu, restart_watchdog_hrtimer, NULL, 1);
519 watchdog_nmi_enable(cpu); 518 watchdog_nmi_enable(cpu);
520} 519}
521 520