Skip to content

Commit

Permalink
x86: touch_nmi_watchdog(): reset alert counters for supported nmi_wat…
Browse files Browse the repository at this point in the history
…chdog modes only

The checking 'if nmi_watchdog > 0' (ie NMI_NONE) is quite fast but it
has a side effect - it's taken even if nmi_watchdog = NMI_DISABLED.

Nowadays nmi_watchdog is set up to NMI_NONE by default so this condition
is properly taken most the time but we better show this explicitly.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Cyrill Gorcunov authored and Ingo Molnar committed Jun 12, 2008
1 parent 75b9f5d commit f781b03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/x86/kernel/nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,8 @@ static DEFINE_PER_CPU(int, nmi_touch);

void touch_nmi_watchdog(void)
{
if (nmi_watchdog > 0) {
if (nmi_watchdog == NMI_LOCAL_APIC ||
nmi_watchdog == NMI_IO_APIC) {
unsigned cpu;

/*
Expand Down

0 comments on commit f781b03

Please sign in to comment.