WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] evtchn.c:

ChangeSet 1.1374, 2005/04/23 12:10:11+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        evtchn.c:
          Fix freebsd lockup.



 evtchn.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)


diff -Nru a/freebsd-5.3-xen-sparse/i386-xen/i386-xen/evtchn.c 
b/freebsd-5.3-xen-sparse/i386-xen/i386-xen/evtchn.c
--- a/freebsd-5.3-xen-sparse/i386-xen/i386-xen/evtchn.c 2005-04-23 08:03:12 
-04:00
+++ b/freebsd-5.3-xen-sparse/i386-xen/i386-xen/evtchn.c 2005-04-23 08:03:12 
-04:00
@@ -54,7 +54,7 @@
 {
     unsigned long  l1, l2;
     unsigned int   l1i, l2i, port;
-    int            irq;
+    int            irq, owned;
     unsigned long  flags;
     shared_info_t *s = HYPERVISOR_shared_info;
     vcpu_info_t   *vcpu_info = &s->vcpu_data[smp_processor_id()];
@@ -78,12 +78,16 @@
                 l2 &= ~(1 << l2i);
             
                 port = (l1i << 5) + l2i;
+                if ( (owned = mtx_owned(&sched_lock)) != 0 )
+                    mtx_unlock_spin_flags(&sched_lock, MTX_QUIET);
                 if ( (irq = evtchn_to_irq[port]) != -1 ) {
                    struct intsrc *isrc = intr_lookup_source(irq);
                    intr_execute_handlers(isrc, frame);
                } else {
                     evtchn_device_upcall(port);
                }
+                if ( owned )
+                    mtx_lock_spin_flags(&sched_lock, MTX_QUIET);               
     
             }
         }
     }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] evtchn.c:, BitKeeper Bot <=