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] [xen-unstable] x86: adjust pirq_spin_lock_irq_desc()

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: adjust pirq_spin_lock_irq_desc()
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Fri, 08 Jul 2011 06:22:28 +0100
Delivery-date: Thu, 07 Jul 2011 22:27:24 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1309549382 -3600
# Node ID 3261d198c3aa573ff7e8370b9787b72ba5dfa38a
# Parent  638f31a30b6ccb3fe26f79b991bed4cd03995809
x86: adjust pirq_spin_lock_irq_desc()

Remove unnecessary/bogus assertions and add retry loop matching
domain_spin_lock_irq_desc().

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---


diff -r 638f31a30b6c -r 3261d198c3aa xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Fri Jul 01 20:42:22 2011 +0100
+++ b/xen/arch/x86/irq.c        Fri Jul 01 20:43:02 2011 +0100
@@ -968,30 +968,31 @@
 }
 
 /*
- * Same with struct pirq already looked up, and d->event_lock already
- * held (thus the PIRQ <-> IRQ mapping can't change under our feet).
+ * Same with struct pirq already looked up.
  */
 struct irq_desc *pirq_spin_lock_irq_desc(
     struct domain *d, const struct pirq *pirq, unsigned long *pflags)
 {
-    int irq = pirq->arch.irq;
     struct irq_desc *desc;
     unsigned long flags;
 
-    ASSERT(spin_is_locked(&d->event_lock));
+    for ( ; ; )
+    {
+        int irq = pirq->arch.irq;
 
-    if ( irq <= 0 )
-        return NULL;
+        if ( irq <= 0 )
+            return NULL;
 
-    desc = irq_to_desc(irq);
-    spin_lock_irqsave(&desc->lock, flags);
+        desc = irq_to_desc(irq);
+        spin_lock_irqsave(&desc->lock, flags);
+        if ( irq == pirq->arch.irq )
+            break;
+        spin_unlock_irqrestore(&desc->lock, flags);
+    }
 
     if ( pflags )
         *pflags = flags;
 
-    ASSERT(pirq == pirq_info(d, domain_irq_to_pirq(d, irq)));
-    ASSERT(irq == pirq->arch.irq);
-
     return desc;
 }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: adjust pirq_spin_lock_irq_desc(), Xen patchbot-unstable <=