From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v3 1/3] x86/nmi: Cleanup usage of nmi_watchdog Date: Fri, 30 Jan 2015 17:33:55 +0000 Message-ID: <54CBC083.2060402@citrix.com> References: <1422638157-1919-1-git-send-email-boris.ostrovsky@oracle.com> <1422638157-1919-2-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.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YHFSQ-0003yi-V8 for xen-devel@lists.xenproject.org; Fri, 30 Jan 2015 17:34:15 +0000 In-Reply-To: <1422638157-1919-2-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: Boris Ostrovsky , JBeulich@suse.com Cc: xen-devel@lists.xenproject.org, kevin.tian@intel.com, dietmar.hahn@ts.fujitsu.com List-Id: xen-devel@lists.xenproject.org On 30/01/15 17:15, Boris Ostrovsky wrote: > Use NMI_NONE when testing whether NMI watchdog is off. > > Remove unused NMI_INVALID macro. > > Signed-off-by: Boris Ostrovsky Reviewed-by: Andrew Cooper > --- > 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;}