[patch] fix NMI watchdog, 2.5.34

From: Ingo Molnar (mingo@elte.hu)
Date: Mon Sep 09 2002 - 14:45:20 EST


the attached patch fixes the NMI watchdog to trigger on all CPUs - the
cpu_up() code broke it long time ago. With this patch NMI interrupts get
generated on all CPUs, not just the boot CPU.

        Ingo

--- linux/arch/i386/kernel/io_apic.c.orig Mon Sep 9 21:34:53 2002
+++ linux/arch/i386/kernel/io_apic.c Mon Sep 9 21:37:27 2002
@@ -1490,7 +1490,7 @@
         end_lapic_irq
 };
 
-static void enable_NMI_through_LVT0 (void * dummy)
+void enable_NMI_through_LVT0 (void * dummy)
 {
         unsigned int v, ver;
 
--- linux/arch/i386/kernel/smpboot.c.orig Mon Sep 9 21:35:48 2002
+++ linux/arch/i386/kernel/smpboot.c Mon Sep 9 21:43:00 2002
@@ -452,6 +452,11 @@
         while (!test_bit(smp_processor_id(), &smp_commenced_mask))
                 rep_nop();
         setup_secondary_APIC_clock();
+ if (nmi_watchdog == NMI_IO_APIC) {
+ disable_8259A_irq(0);
+ enable_NMI_through_LVT0(NULL);
+ enable_8259A_irq(0);
+ }
         enable_APIC_timer();
         /*
          * low-memory mappings have been cleared, flush them from
--- linux/include/asm-i386/apic.h.orig Mon Sep 9 21:37:43 2002
+++ linux/include/asm-i386/apic.h Mon Sep 9 21:37:51 2002
@@ -89,6 +89,7 @@
 
 extern unsigned int apic_timer_irqs [NR_CPUS];
 extern int check_nmi_watchdog (void);
+extern void enable_NMI_through_LVT0 (void * dummy);
 
 extern unsigned int nmi_watchdog;
 #define NMI_NONE 0

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Sep 15 2002 - 22:00:18 EST