xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Keir Fraser <keir@xen.org>, Jan Beulich <JBeulich@suse.com>,
	Tim Deegan <tim@xen.org>
Subject: [PATCH 2/3] x86/watchdog: Tweak implementation given new common code.
Date: Mon, 12 Aug 2013 14:37:59 +0100	[thread overview]
Message-ID: <1376314680-12548-3-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1376314680-12548-1-git-send-email-andrew.cooper3@citrix.com>

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <JBeulich@suse.com>
CC: Tim Deegan <tim@xen.org>
---
 xen/arch/x86/nmi.c   |    6 ++++--
 xen/arch/x86/setup.c |    3 +--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/nmi.c b/xen/arch/x86/nmi.c
index 3eb2456..5827bd4 100644
--- a/xen/arch/x86/nmi.c
+++ b/xen/arch/x86/nmi.c
@@ -419,6 +419,9 @@ int __init watchdog_setup(void)
 {
     unsigned int cpu;
 
+    if ( !opt_watchdog )
+        return 0;
+
     /*
      * Activate periodic heartbeats. We cannot do this earlier during 
      * setup because the timer infrastructure is not available.
@@ -435,8 +438,7 @@ void nmi_watchdog_tick(struct cpu_user_regs * regs)
 {
     unsigned int sum = this_cpu(nmi_timer_ticks);
 
-    if ( (this_cpu(last_irq_sums) == sum) &&
-         !atomic_read(&watchdog_disable_count) )
+    if ( (this_cpu(last_irq_sums) == sum) && watchdog_enabled() )
     {
         /*
          * Ayiee, looks like this CPU is stuck ... wait for the timeout
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index c550e8e..2d1edb5 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -1310,8 +1310,7 @@ void __init __start_xen(unsigned long mbi_p)
 
     do_initcalls();
 
-    if ( opt_watchdog ) 
-        watchdog_setup();
+    watchdog_setup();
 
     if ( !tboot_protect_mem_regions() )
         panic("Could not protect TXT memory regions\n");
-- 
1.7.10.4

  parent reply	other threads:[~2013-08-12 13:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-12 13:37 Xen watchdog improvements Andrew Cooper
2013-08-12 13:37 ` [PATCH 1/3] xen/watchdog: Move watchdog from being x86 specific to common code Andrew Cooper
2013-08-12 13:37 ` Andrew Cooper [this message]
2013-08-12 13:49   ` [PATCH 2/3] x86/watchdog: Tweak implementation given new " Jan Beulich
2013-08-12 13:54     ` Andrew Cooper
2013-08-12 14:03       ` [Patch v2 " Andrew Cooper
2013-08-12 13:38 ` [PATCH 3/3] watchdog/crash: Always disable watchdog in console_force_unlock() Andrew Cooper
2013-08-12 13:47 ` Xen watchdog improvements Josh Zhao
2013-08-12 15:20   ` Andrew Cooper
2013-08-12 13:51 ` Jan Beulich
2013-08-12 16:50 ` Keir Fraser

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=1376314680-12548-3-git-send-email-andrew.cooper3@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).