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

[XenPPC] [PATCH] Memory barrier after sp store

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [PATCH] Memory barrier after sp store
From: Amos Waterland <apw@xxxxxxxxxx>
Date: Thu, 9 Nov 2006 18:10:02 -0500
Delivery-date: Thu, 09 Nov 2006 15:10:12 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
Ensure that the store to pa.hype_stack_base will be seen before the
store of pa to global_cpu_table[cpuid].

I have been unable to demonstrate this causing a problem in practice
despite many attempts, but I think it should go in by inspection anyway.

Signed-off-by: Amos Waterland <apw@xxxxxxxxxx>

---

 setup.c |    1 +
 1 file changed, 1 insertion(+)

diff -r 9148f7816d00 xen/arch/powerpc/setup.c
--- a/xen/arch/powerpc/setup.c  Tue Oct 24 19:11:00 2006 -0400
+++ b/xen/arch/powerpc/setup.c  Thu Nov 02 12:29:58 2006 -0500
@@ -234,6 +234,7 @@ static void init_parea(int cpuid)
     pa->whoami = cpuid;
     pa->hard_id = cpu_hard_id[cpuid];
     pa->hyp_stack_base = (void *)((ulong)stack + STACK_SIZE);
+    mb();
 
     /* This store has the effect of invoking secondary_cpu_init.  */
     global_cpu_table[cpuid] = pa;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [PATCH] Memory barrier after sp store, Amos Waterland <=