Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/sys/arch/xen/i386 Pull up revision 1.5 (requested by bouy...



details:   https://anonhg.NetBSD.org/src/rev/ca1e5363137a
branches:  netbsd-3
changeset: 574949:ca1e5363137a
user:      tron <tron%NetBSD.org@localhost>
date:      Sun Mar 20 14:28:23 2005 +0000

description:
Pull up revision 1.5 (requested by bouyer in ticket #29):
Avoid loosing upcalls in stipending() by checking evtchn_upcall_pending
with upcalls unmasked.

diffstat:

 sys/arch/xen/i386/hypervisor_machdep.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (41 lines):

diff -r 9db60bf00fae -r ca1e5363137a sys/arch/xen/i386/hypervisor_machdep.c
--- a/sys/arch/xen/i386/hypervisor_machdep.c    Sun Mar 20 12:12:33 2005 +0000
+++ b/sys/arch/xen/i386/hypervisor_machdep.c    Sun Mar 20 14:28:23 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hypervisor_machdep.c,v 1.4 2005/03/09 22:39:20 bouyer Exp $    */
+/*     $NetBSD: hypervisor_machdep.c,v 1.4.2.1 2005/03/20 14:28:23 tron Exp $  */
 
 /*
  *
@@ -59,7 +59,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.4 2005/03/09 22:39:20 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.4.2.1 2005/03/20 14:28:23 tron Exp $");
 
 #include <sys/cdefs.h>
 #include <sys/param.h>
@@ -112,8 +112,10 @@
         * we're only called after STIC, so we know that we'll have to
         * STI at the end
         */
-       cli();
        while (s->vcpu_data[0].evtchn_upcall_pending) {
+               __insn_barrier();
+               cli();
+               __insn_barrier();
                s->vcpu_data[0].evtchn_upcall_pending = 0;
                /* NB. No need for a barrier here -- XCHG is a barrier
                 * on x86. */
@@ -141,8 +143,9 @@
 #endif
                        }
                }
+               __insn_barrier();
+               sti();
        }
-       sti();
 
 #if 0
        if (ci->ci_ipending & 0x1)



Home | Main Index | Thread Index | Old Index