From: Isaku Yamahata Date: Mon, 16 Jun 2008 21:58:13 +0000 (-0700) Subject: xen: Use wmb instead of rmb in xen_evtchn_do_upcall(). X-Git-Tag: v2.6.27-rc1~1106^2~251^24~7 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6673cf63e5d973db5145d1f48b354efcb9fe2a13;p=linux-2.6-omap-h63xx.git xen: Use wmb instead of rmb in xen_evtchn_do_upcall(). This patch is ported one from 534:77db69c38249 of linux-2.6.18-xen.hg. Use wmb instead of rmb to enforce ordering between evtchn_upcall_pending and evtchn_pending_sel stores in xen_evtchn_do_upcall(). Cc: Samuel Thibault Signed-off-by: Isaku Yamahata Cc: Nick Piggin Cc: the arch/x86 maintainers Signed-off-by: Ingo Molnar --- diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 73d78dc9b87..332dd63750a 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@ -529,7 +529,7 @@ void xen_evtchn_do_upcall(struct pt_regs *regs) #ifndef CONFIG_X86 /* No need for a barrier -- XCHG is a barrier on x86. */ /* Clear master flag /before/ clearing selector flag. */ - rmb(); + wmb(); #endif pending_words = xchg(&vcpu_info->evtchn_pending_sel, 0); while (pending_words != 0) {