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-devel

[Xen-devel] [PATCH] make SMP boot again with gcc 4

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] make SMP boot again with gcc 4
From: Rik van Riel <riel@xxxxxxxxxx>
Date: Mon, 28 Mar 2005 15:39:51 -0500 (EST)
Delivery-date: Mon, 28 Mar 2005 20:40:01 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
For unknown reasons, this bug doesn't show up when Xen is compiled
with gcc-3.4, so I was off on a wild goose chase for a few days.
With this barrier added, the system boots fine again.

Note that we should probably move barrier into cpu_relax, but that's
a story for another patch.

Signed-off-by: Rik van Riel <riel@xxxxxxxxxx>

--- xen-unstable/xen/arch/x86/smpboot.c.barrier 2005-03-28 15:17:11.000000000 
-0500
+++ xen-unstable/xen/arch/x86/smpboot.c 2005-03-28 15:32:30.000000000 -0500
@@ -413,8 +413,10 @@ void __init start_secondary(void)
 
     smp_callin();
 
-    while (!atomic_read(&smp_commenced))
-        rep_nop();
+    while (!atomic_read(&smp_commenced)) {
+        cpu_relax();
+        barrier();
+    }
 
 #ifdef __i386__
     /*

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

<Prev in Thread] Current Thread [Next in Thread>