[PATCH] fix x86-64 condition to call nmi_watchdog_tick

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(Note: Patch also attached because the inline version is certain to get
line wrapped.)

Don't call nmi_watchdog_tick() when this isn't enabled.

Signed-off-by: Jan Beulich <[email protected]>

diff -Npru 2.6.13/arch/x86_64/kernel/io_apic.c
2.6.13-x86_64-watchdog-active/arch/x86_64/kernel/io_apic.c
--- 2.6.13/arch/x86_64/kernel/io_apic.c	2005-08-29
01:41:01.000000000 +0200
+++
2.6.13-x86_64-watchdog-active/arch/x86_64/kernel/io_apic.c	2005-09-01
11:32:11.000000000 +0200
@@ -1529,6 +1529,7 @@ static void setup_nmi (void)
 	 */ 
 	printk(KERN_INFO "activating NMI Watchdog ...");
 
+	nmi_active = 1;
 	enable_NMI_through_LVT0(NULL);
 
 	printk(" done.\n");
diff -Npru 2.6.13/arch/x86_64/kernel/traps.c
2.6.13-x86_64-watchdog-active/arch/x86_64/kernel/traps.c
--- 2.6.13/arch/x86_64/kernel/traps.c	2005-08-29 01:41:01.000000000
+0200
+++
2.6.13-x86_64-watchdog-active/arch/x86_64/kernel/traps.c	2005-09-07
13:30:20.000000000 +0200
@@ -603,7 +603,7 @@ asmlinkage void default_do_nmi(struct pt
 		 * Ok, so this is none of the documented NMI sources,
 		 * so it must be the NMI watchdog.
 		 */
-		if (nmi_watchdog > 0) {
+		if (nmi_watchdog > 0 && nmi_active > 0) {
 			nmi_watchdog_tick(regs,reason);
 			return;
 		}
diff -Npru 2.6.13/include/asm-x86_64/apic.h
2.6.13-x86_64-watchdog-active/include/asm-x86_64/apic.h
--- 2.6.13/include/asm-x86_64/apic.h	2005-08-29 01:41:01.000000000
+0200
+++
2.6.13-x86_64-watchdog-active/include/asm-x86_64/apic.h	2005-09-01
11:32:12.000000000 +0200
@@ -103,6 +103,7 @@ extern void nmi_watchdog_default(void);
 extern int setup_nmi_watchdog(char *);
 
 extern unsigned int nmi_watchdog;
+extern int nmi_active;
 #define NMI_DEFAULT	-1
 #define NMI_NONE	0
 #define NMI_IO_APIC	1

Attachment: linux-2.6.13-x86_64-watchdog-active.patch
Description: Binary data


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux