]> xenbits.xensource.com Git - xen.git/commitdiff
x86: cleanup usage of nmi_watchdog
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Tue, 3 Feb 2015 10:29:28 +0000 (11:29 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 3 Feb 2015 10:29:28 +0000 (11:29 +0100)
Use NMI_NONE when testing whether NMI watchdog is off.

Remove unused NMI_INVALID macro.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/nmi.c
xen/arch/x86/traps.c
xen/include/asm-x86/apic.h

index 98c1e15fa1c723d276154e36486945d4040d13f9..2ab97a09866f7d7f5967c5bc4ea3347f2ef3068f 100644 (file)
@@ -148,7 +148,7 @@ int __init check_nmi_watchdog (void)
     int cpu;
     bool_t ok = 1;
 
-    if ( !nmi_watchdog )
+    if ( nmi_watchdog == NMI_NONE )
         return 0;
 
     printk("Testing NMI watchdog on all CPUs:");
@@ -361,7 +361,7 @@ static int __pminit setup_p4_watchdog(void)
 
 void __pminit setup_apic_nmi_watchdog(void)
 {
-    if (!nmi_watchdog)
+    if ( nmi_watchdog == NMI_NONE )
         return;
 
     switch (boot_cpu_data.x86_vendor) {
index ec324b0ec709646459791bc2f1ac5a0b8840c458..f5516dc27ea3ce2c864b80b9f0ad9eee09b72ede 100644 (file)
@@ -3385,7 +3385,8 @@ void do_nmi(const struct cpu_user_regs *regs)
     if ( nmi_callback(regs, cpu) )
         return;
 
-    if ( !nmi_watchdog || (!nmi_watchdog_tick(regs) && watchdog_force) )
+    if ( (nmi_watchdog == NMI_NONE) ||
+         (!nmi_watchdog_tick(regs) && watchdog_force) )
         handle_unknown = 1;
 
     /* Only the BSP gets external NMIs from the system. */
index 66972455c482eed4b840e503b14e18515f77a31e..be9a535922fd15fd0aa631fa7aa073f62cc06f31 100644 (file)
@@ -221,7 +221,6 @@ extern unsigned int nmi_watchdog;
 #define NMI_NONE       0
 #define NMI_IO_APIC    1
 #define NMI_LOCAL_APIC 2
-#define NMI_INVALID    3
 
 #else /* !CONFIG_X86_LOCAL_APIC */
 static inline int lapic_suspend(void) {return 0;}