Commit 99019e91 authored by Jan Beulich's avatar Jan Beulich Committed by Linus Torvalds

[PATCH] x86_64: make touch_nmi_watchdog() not touch impossible cpus' private data

Along with that, also suppress the memory touching altogether when the
watchdog is not running, to eliminate needless crosstalk. Plus ad a call
to it to make things consistent (one could also consider removing the call
in enable_timer_nmi_watchdog()).
Signed-off-by: default avatarJan Beulich <jbeulich@novell.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e4444d1a
...@@ -236,6 +236,7 @@ static void enable_lapic_nmi_watchdog(void) ...@@ -236,6 +236,7 @@ static void enable_lapic_nmi_watchdog(void)
{ {
if (nmi_active < 0) { if (nmi_active < 0) {
nmi_watchdog = NMI_LOCAL_APIC; nmi_watchdog = NMI_LOCAL_APIC;
touch_nmi_watchdog();
setup_apic_nmi_watchdog(); setup_apic_nmi_watchdog();
} }
} }
...@@ -456,15 +457,17 @@ static DEFINE_PER_CPU(int, nmi_touch); ...@@ -456,15 +457,17 @@ static DEFINE_PER_CPU(int, nmi_touch);
void touch_nmi_watchdog (void) void touch_nmi_watchdog (void)
{ {
int i; if (nmi_watchdog > 0) {
unsigned cpu;
/* /*
* Tell other CPUs to reset their alert counters. We cannot * Tell other CPUs to reset their alert counters. We cannot
* do it ourselves because the alert count increase is not * do it ourselves because the alert count increase is not
* atomic. * atomic.
*/ */
for (i = 0; i < NR_CPUS; i++) for_each_present_cpu (cpu)
per_cpu(nmi_touch, i) = 1; per_cpu(nmi_touch, cpu) = 1;
}
touch_softlockup_watchdog(); touch_softlockup_watchdog();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment