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] [xen-4.0-testing] x86: fix boot-time watchdog test.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] x86: fix boot-time watchdog test.
From: Xen patchbot-4.0-testing <patchbot@xxxxxxx>
Date: Sat, 09 Jul 2011 13:44:08 +0100
Delivery-date: Sat, 09 Jul 2011 05:44:28 -0700
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Tim Deegan <Tim.Deegan@xxxxxxxxxx>
# Date 1310112022 -3600
# Node ID 9199d2b31625d82e8c95d51ebef3aeac3c3f2091
# Parent  600e224e8c51aea65b09b61bd64807521b5fbb0d
x86: fix boot-time watchdog test.

Since the perf counter that the LAPIC NMI watchdog uses only
runs while the core isn't halted, and all APs are idle at
this point in the boot process, it's possible that remote
CPUs won't see any NMIs during the 10-tick waiting period.
Force all CPUs to busy-wait so we know the timers are running.

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
xen-unstable changeset:   23612:6c7a23e08a04
xen-unstable date:        Tue Jun 28 09:16:13 2011 +0100
---


diff -r 600e224e8c51 -r 9199d2b31625 xen/arch/x86/nmi.c
--- a/xen/arch/x86/nmi.c        Thu Jun 23 12:06:36 2011 +0100
+++ b/xen/arch/x86/nmi.c        Fri Jul 08 09:00:22 2011 +0100
@@ -94,6 +94,11 @@
     (P4_CCCR_OVF_PMI0|P4_CCCR_THRESHOLD(15)|P4_CCCR_COMPLEMENT| \
      P4_CCCR_COMPARE|P4_CCCR_REQUIRED|P4_CCCR_ESCR_SELECT(4)|P4_CCCR_ENABLE)
 
+static void __init wait_for_nmis(void *p)
+{
+    mdelay((10*1000)/nmi_hz); /* wait 10 ticks */
+}
+
 int __init check_nmi_watchdog (void)
 {
     static unsigned int __initdata prev_nmi_count[NR_CPUS];
@@ -107,7 +112,12 @@
     for ( cpu = 0; cpu < NR_CPUS; cpu++ ) 
         prev_nmi_count[cpu] = nmi_count(cpu);
     local_irq_enable();
-    mdelay((10*1000)/nmi_hz); /* wait 10 ticks */
+
+    /* Wait for 10 ticks.  Busy-wait on all CPUs: the LAPIC counter that
+     * the NMI watchdog uses only runs while the core's not halted */
+    if ( nmi_watchdog == NMI_LOCAL_APIC )
+        smp_call_function(wait_for_nmis, NULL, 0);
+    wait_for_nmis(NULL);
 
     for ( cpu = 0; cpu < NR_CPUS; cpu++ ) 
     {

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.0-testing] x86: fix boot-time watchdog test., Xen patchbot-4 . 0-testing <=