[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 2/3] x86/watchdog: Tweak implementation given new common code.



Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CC: Keir Fraser <keir@xxxxxxx>
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Tim Deegan <tim@xxxxxxx>
---
 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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.