Patch 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.



 arch/i386/kernel/io_apic.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN arch/i386/kernel/io_apic.c~nmi-watchdog-fix arch/i386/kernel/io_apic.c
--- 25/arch/i386/kernel/io_apic.c~nmi-watchdog-fix	2003-03-17 22:07:00.000000000 -0800
+++ 25-akpm/arch/i386/kernel/io_apic.c	2003-03-17 22:07:00.000000000 -0800
@@ -2081,7 +2081,7 @@ static inline void check_timer(void)
 	}
 	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");
 		nmi_watchdog = 0;
 	}

_