X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=kernel%2Fwatchdog.c;h=e90089fd78e003130e7ab788e409b3de62fd0c38;hb=05b1332eafba8eb250da2d2c4c52ed436a127f90;hp=01c6f979486fcf9eb1b49b3180bec069d01b0e2c;hpb=e6d9bfc63813882c896bf7ea6f6b14ca7b50b755;p=karo-tx-linux.git diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 01c6f979486f..e90089fd78e0 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -158,14 +158,14 @@ void touch_all_softlockup_watchdogs(void) #ifdef CONFIG_HARDLOCKUP_DETECTOR void touch_nmi_watchdog(void) { - if (watchdog_user_enabled) { - unsigned cpu; - - for_each_present_cpu(cpu) { - if (per_cpu(watchdog_nmi_touch, cpu) != true) - per_cpu(watchdog_nmi_touch, cpu) = true; - } - } + /* + * Using __raw here because some code paths have + * preemption enabled. If preemption is enabled + * then interrupts should be enabled too, in which + * case we shouldn't have to worry about the watchdog + * going off. + */ + __raw_get_cpu_var(watchdog_nmi_touch) = true; touch_softlockup_watchdog(); } EXPORT_SYMBOL(touch_nmi_watchdog);