WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Ensure watchdog remains disabled unless enabled on the c

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Ensure watchdog remains disabled unless enabled on the command line.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 13 Jan 2006 18:28:13 +0000
Delivery-date: Fri, 13 Jan 2006 18:36:20 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian.Campbell@xxxxxxxxxxxxx
# Node ID 956bf08c91c36e6734d9c38d2e481732c976d32b
# Parent  19f5ffa02154db55a4fa5a67201e763d8626868b
Ensure watchdog remains disabled unless enabled on the command line.

Bail out of setup_apic_nmi_watchdog() early if watchdog is not
enabled. Is the watchdog is disabled then increment
watchdog_disable_count to prevent it ever becoming enabled.

Unconditionally call setup_apic_nmi_watchdog() from setup_local_APIC()
so that the above is guaranteed to have occurred before the first call
of watchdog_enable().

Signed-off-by: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>

diff -r 19f5ffa02154 -r 956bf08c91c3 xen/arch/x86/apic.c
--- a/xen/arch/x86/apic.c       Fri Jan 13 11:04:04 2006
+++ b/xen/arch/x86/apic.c       Fri Jan 13 14:09:39 2006
@@ -451,8 +451,7 @@
             printk("No ESR for 82489DX.\n");
     }
 
-    if (nmi_watchdog == NMI_LOCAL_APIC)
-        setup_apic_nmi_watchdog();
+    setup_apic_nmi_watchdog();
 }
 
 /*
diff -r 19f5ffa02154 -r 956bf08c91c3 xen/arch/x86/nmi.c
--- a/xen/arch/x86/nmi.c        Fri Jan 13 11:04:04 2006
+++ b/xen/arch/x86/nmi.c        Fri Jan 13 14:09:39 2006
@@ -31,6 +31,10 @@
 #include <asm/div64.h>
 
 unsigned int nmi_watchdog = NMI_NONE;
+static spinlock_t   watchdog_lock = SPIN_LOCK_UNLOCKED;
+static unsigned int watchdog_disable_count = 1;
+static unsigned int watchdog_on;
+
 static unsigned int nmi_hz = HZ;
 static unsigned int nmi_perfctr_msr;   /* the MSR to reset in NMI handler */
 static unsigned int nmi_p4_cccr_val;
@@ -310,8 +314,16 @@
 {
     int cpu = smp_processor_id();
 
-    if (!nmi_watchdog)
-        return;
+    if ( nmi_active < 0 )
+       return;
+
+    if ( !nmi_watchdog )
+    {
+       /* Force the watchdog to always be disabled. */
+       watchdog_disable_count++;
+       nmi_active = -1;
+       return;
+    }
 
     switch (boot_cpu_data.x86_vendor) {
     case X86_VENDOR_AMD:
@@ -351,10 +363,6 @@
 static unsigned int
 last_irq_sums [NR_CPUS],
     alert_counter [NR_CPUS];
-
-static spinlock_t   watchdog_lock = SPIN_LOCK_UNLOCKED;
-static unsigned int watchdog_disable_count = 1;
-static unsigned int watchdog_on;
 
 void watchdog_disable(void)
 {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Ensure watchdog remains disabled unless enabled on the command line., Xen patchbot -unstable <=