From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: [PATCH v2 1/3] x86/nmi: Cleanup usage of nmi_watchdog Date: Thu, 29 Jan 2015 12:58:37 -0500 Message-ID: <1422554319-1906-2-git-send-email-boris.ostrovsky@oracle.com> References: <1422554319-1906-1-git-send-email-boris.ostrovsky@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YGtZ1-0002bl-Uo for xen-devel@lists.xenproject.org; Thu, 29 Jan 2015 18:11:36 +0000 In-Reply-To: <1422554319-1906-1-git-send-email-boris.ostrovsky@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: JBeulich@suse.com, andrew.cooper3@citrix.com Cc: xen-devel@lists.xenproject.org, kevin.tian@intel.com, boris.ostrovsky@oracle.com, dietmar.hahn@ts.fujitsu.com List-Id: xen-devel@lists.xenproject.org Use NMI_NONE when testing whether NMI watchdog is off. Remove unused NMI_INVALID macro. Signed-off-by: Boris Ostrovsky --- xen/arch/x86/nmi.c | 4 ++-- xen/arch/x86/traps.c | 3 ++- xen/include/asm-x86/apic.h | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/nmi.c b/xen/arch/x86/nmi.c index 98c1e15..2ab97a0 100644 --- a/xen/arch/x86/nmi.c +++ b/xen/arch/x86/nmi.c @@ -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) { diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index ec324b0..f5516dc 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -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. */ diff --git a/xen/include/asm-x86/apic.h b/xen/include/asm-x86/apic.h index 6697245..be9a535 100644 --- a/xen/include/asm-x86/apic.h +++ b/xen/include/asm-x86/apic.h @@ -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;} -- 1.8.1.4