Skip to contentSkip to conversation

watchdog: Allow touch_nmi_watchdog() to be called by acpi_os_stall()

PATCH New Rafael J. Wysocki 1 participant 1 message Aug 25, 2010 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: Allow touch_nmi_watchdog() to be called by acpi_os_stall()

From: Rafael J. Wysocki <[email protected]>

acpi_os_stall() executes touch_nmi_watchdog() that, if CONFIG_HARDLOCKUP_DETECTOR is set,
uses __get_cpu_var() to access per-CPU variables. This triggers the stack dump in debug_smp_processor_id().

One way to avoid that is to use __raw_get_cpu_var() to access the per-CPU variables in touch_nmi_watchdog().

---
 kernel/watchdog.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/watchdog.c +2 -2
Index: linux-2.6/kernel/watchdog.c
===================================================================
@@ -142,8 +142,8 @@ void touch_all_softlockup_watchdogs(void
 #ifdef CONFIG_HARDLOCKUP_DETECTOR
 void touch_nmi_watchdog(void)
 {
-	__get_cpu_var(watchdog_nmi_touch) = true;
-	touch_softlockup_watchdog();
+	__raw_get_cpu_var(watchdog_nmi_touch) = true;
+	__raw_get_cpu_var(watchdog_touch_ts) = 0;
 }
 EXPORT_SYMBOL(touch_nmi_watchdog);