public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] fix NMI watchdog, 2.5.34
@ 2002-09-09 19:45 Ingo Molnar
  2002-09-10  5:19 ` Rusty Russell
  0 siblings, 1 reply; 4+ messages in thread
From: Ingo Molnar @ 2002-09-09 19:45 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, Rusty Russell


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-09-12  7:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-09 19:45 [patch] fix NMI watchdog, 2.5.34 Ingo Molnar
2002-09-10  5:19 ` Rusty Russell
2002-09-10 18:11   ` Zwane Mwaikambo
2002-09-12  7:48     ` Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox