]> git.hungrycats.org Git - linux/commitdiff
[PATCH] NMI watchdog SMP fix
authorIngo Molnar <mingo@elte.hu>
Fri, 13 Sep 2002 12:28:16 +0000 (05:28 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Fri, 13 Sep 2002 12:28:16 +0000 (05:28 -0700)
This makes NMIs work - otherwise they go to CPU 0 only and any hard
lockup on the other CPUs will not be detected by the nmi_watchdog.

arch/i386/kernel/io_apic.c
arch/i386/kernel/smpboot.c
include/asm-i386/apic.h

index ed8a1f9275f61bc57b91496d109c63035332e54a..1e4ef81d5e8ebbfb897991fb63f89844b9110c68 100644 (file)
@@ -1490,7 +1490,7 @@ static struct hw_interrupt_type lapic_irq_type = {
        end_lapic_irq
 };
 
-static void enable_NMI_through_LVT0 (void * dummy)
+void enable_NMI_through_LVT0 (void * dummy)
 {
        unsigned int v, ver;
 
index dc115fbe74926a26cf7617fdf93a5dedb5d0a0af..4f1628f3eaeb7d4ce16e806184fb3649ae63af82 100644 (file)
@@ -445,6 +445,11 @@ int __init start_secondary(void *unused)
        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
index 3947866376d1a0a549d6011c7f029f29ab2be6e5..a99aa679923d99cfae9af3636cd293dfe700c2b8 100644 (file)
@@ -89,6 +89,7 @@ extern void apic_pm_unregister(struct pm_dev*);
 
 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