lkml.org 
[lkml]   [2005]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] fix x86-64 condition to call nmi_watchdog_tick
(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 <jbeulich@novell.com>

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
[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2005-09-08 18:12    [W:0.042 / U:1.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site