# HG changeset patch # User yamahata@xxxxxxxxxxxxx # Node ID cc21edd631413b70d97f0defd20e7faa42237cdf # Parent ae245d35457b03f680b994437bd25532b98aa523 evtchn_do_upcall() has a micro optimization which is depends on that xchg is a barrier. However xchg of IA64 has acquire semantics so that event channel notification is lost sometimes. This patch fixes it. PATCHNAME: memory_barrier_evtchn_do_upcall Signed-off-by: Isaku Yamahata diff -r ae245d35457b -r cc21edd63141 linux-2.6-xen-sparse/drivers/xen/core/evtchn.c --- a/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c Wed Jun 28 13:59:29 2006 +0100 +++ b/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c Fri Jun 30 10:44:54 2006 +0900 @@ -220,6 +220,9 @@ asmlinkage void evtchn_do_upcall(struct vcpu_info->evtchn_upcall_pending = 0; /* NB. No need for a barrier here -- XCHG is a barrier on x86. */ +#ifndef CONFIG_X86 + rmb(); +#endif l1 = xchg(&vcpu_info->evtchn_pending_sel, 0); while (l1 != 0) { l1i = __ffs(l1);