[prev in list] [next in list] [prev in thread] [next in thread]
List: xen-cvs
Subject: [Xen-changelog] [xen-unstable] evtchn_do_upcall() has a micro
From: Xen patchbot-unstable <patchbot-unstable () lists ! xensource ! com>
Date: 2006-06-30 15:40:45
Message-ID: E1FwL6s-0007ND-L9 () xenbits ! xensource ! com
[Download RAW message or body]
# HG changeset patch
# User kaf24@firebug.cl.cam.ac.uk
# Node ID c9696012fe05347ad6a0d503bc55b53b76783af3
# Parent 5db7bbccf4d2d759265415085fa81094893f60a9
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.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
---
linux-2.6-xen-sparse/drivers/xen/core/evtchn.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
diff -r 5db7bbccf4d2 -r c9696012fe05 linux-2.6-xen-sparse/drivers/xen/core/evtchn.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c Fri Jun 30 10:04:22 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c Fri Jun 30 10:07:38 2006 +0100
@@ -219,7 +219,10 @@ 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 /* No need for a barrier -- XCHG is a barrier on x86. */
+ /* Clear master pending flag /before/ clearing selector flag. */
+ rmb();
+#endif
l1 = xchg(&vcpu_info->evtchn_pending_sel, 0);
while (l1 != 0) {
l1i = __ffs(l1);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@lists.xensource.com
http://lists.xensource.com/xen-changelog
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic