From f781b03c4b1c713ac000877c8bbc31fc4164a29b Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Thu, 12 Jun 2008 17:08:16 +0400 Subject: x86: touch_nmi_watchdog(): reset alert counters for supported nmi_watchdog 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 Signed-off-by: Ingo Molnar --- arch/x86/kernel/nmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c index 19f1b95265cf..326a8f4f50f8 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/nmi.c @@ -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; /* -- cgit v1.2.3