All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>, JBeulich@suse.com
Cc: xen-devel@lists.xenproject.org, kevin.tian@intel.com,
	dietmar.hahn@ts.fujitsu.com
Subject: Re: [PATCH v3 1/3] x86/nmi: Cleanup usage of nmi_watchdog
Date: Fri, 30 Jan 2015 17:33:55 +0000	[thread overview]
Message-ID: <54CBC083.2060402@citrix.com> (raw)
In-Reply-To: <1422638157-1919-2-git-send-email-boris.ostrovsky@oracle.com>

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 <boris.ostrovsky@oracle.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

> ---
>  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;}

  reply	other threads:[~2015-01-30 17:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30 17:15 [PATCH v3 0/3] A few VPMU/watchdog-related patches Boris Ostrovsky
2015-01-30 17:15 ` [PATCH v3 1/3] x86/nmi: Cleanup usage of nmi_watchdog Boris Ostrovsky
2015-01-30 17:33   ` Andrew Cooper [this message]
2015-01-30 17:15 ` [PATCH v3 2/3] x86/VPMU: Disable VPMU when NMI watchdog is on Boris Ostrovsky
2015-01-30 17:37   ` Andrew Cooper
2015-01-30 17:15 ` [PATCH v3 3/3] x86/VPMU: Handle APIC_LVTPC accesses Boris Ostrovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54CBC083.2060402@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=dietmar.hahn@ts.fujitsu.com \
    --cc=kevin.tian@intel.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.