Commit e28b748d authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] NMI watchdog fix

From: William Lee Irwin III <wli@holomorphy.com>

The NMI watchdog has two different "modes": NMI_IO_APIC, which delivers NMI's
through the IO-APIC, and NMI_LOCAL_APIC, which uses the local APIC vector
table (LVT) to deliver the periodic NMI's.

Only NMI_IO_APIC requires being able to set up the PIT so it can deliver
NMI's through the IO-APIC, and so NMI_LOCAL_APIC has no dependency on the
timer being set up through the IO-APIC and is unjustifiably disabled by
check_timer() when the PIT cannot deliver interrupts through the IO-APIC.

This is important because one of the most important uses of NMI_LOCAL_APIC is
to get the NMI watchdog going when NMI_IO_APIC doesn't work.

So what this patch does to repair the situation is instead of checking to see
if the NMI watchdog is enabled at all, it instead checks whether the NMI
watchdog is being used in NMI_IO_APIC mode when a failure to set up the NMI
timer interrupt through the IO-APIC occurs.
parent 0a20887d
...@@ -2081,7 +2081,7 @@ static inline void check_timer(void) ...@@ -2081,7 +2081,7 @@ static inline void check_timer(void)
} }
printk(" failed.\n"); printk(" failed.\n");
if (nmi_watchdog) { if (nmi_watchdog == NMI_IO_APIC) {
printk(KERN_WARNING "timer doesn't work through the IO-APIC - disabling NMI Watchdog!\n"); printk(KERN_WARNING "timer doesn't work through the IO-APIC - disabling NMI Watchdog!\n");
nmi_watchdog = 0; nmi_watchdog = 0;
} }
......
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