]> xenbits.xensource.com Git - people/liuw/mini-os.git/commitdiff
minios: in non-x86 case, use wmb to enforce ordering between
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 8 May 2008 10:55:13 +0000 (11:55 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 8 May 2008 10:55:13 +0000 (11:55 +0100)
evtchn_upcall_pending and evtchn_pending_sel stores.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
hypervisor.c

index 3bb47a424d4952e118808ff170e028483d17ffe9..acc9494c019c1a986508b6fb599353849cfadb3c 100644 (file)
@@ -46,7 +46,11 @@ void do_hypervisor_callback(struct pt_regs *regs)
     in_callback = 1;
    
     vcpu_info->evtchn_upcall_pending = 0;
-    /* NB. No need for a barrier here -- XCHG is a barrier on x86. */
+    /* NB x86. No need for a barrier here -- XCHG is a barrier on x86. */
+#if !defined(__i386__) && !defined(__x86_64__)
+    /* Clear master flag /before/ clearing selector flag. */
+    wmb();
+#endif
     l1 = xchg(&vcpu_info->evtchn_pending_sel, 0);
     while ( l1 != 0 )
     {