Skip to content

Commit

Permalink
[PATCH] i386: Don't touch per cpu memory of offline CPUs in touch_nmi…
Browse files Browse the repository at this point in the history
…_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>
  • Loading branch information
Jan Beulich authored and Andi Kleen committed Dec 7, 2006
1 parent b0bfece commit c6ea396
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions arch/i386/kernel/nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c6ea396

Please sign in to comment.