diff options
author | Jan Beulich <jbeulich@novell.com> | 2006-12-07 02:14:09 +0100 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-12-07 02:14:09 +0100 |
commit | c6ea396de6836bdeb2d2433368130642bf0f6e15 (patch) | |
tree | 1a2b243da4769f5a8b5f017180bacda2cd987ffb /arch/i386/kernel | |
parent | b0bfece40b1988aa8e3d910938691dce7859d82d (diff) | |
download | linux-c6ea396de6836bdeb2d2433368130642bf0f6e15.tar.bz2 |
[PATCH] i386: Don't touch per cpu memory of offline CPUs in touch_nmi_watchdog
Just like on x86-64, don't touch foreign CPUs' memory if the watchdog
isn't enabled at all.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/i386/kernel')
-rw-r--r-- | arch/i386/kernel/nmi.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index 171194ccb7bc..f5bc7e1be801 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c @@ -870,14 +870,16 @@ static unsigned int void touch_nmi_watchdog (void) { - int i; + if (nmi_watchdog > 0) { + unsigned cpu; - /* - * Just reset the alert counters, (other CPUs might be - * spinning on locks we hold): - */ - for_each_possible_cpu(i) - alert_counter[i] = 0; + /* + * Just reset the alert counters, (other CPUs might be + * spinning on locks we hold): + */ + for_each_present_cpu (cpu) + alert_counter[cpu] = 0; + } /* * Tickle the softlockup detector too: |