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-devel

[Xen-devel] [PATCH 04/11] Fix find_unbound_irq in presence of ioapic irq

To: linux-kernel@xxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 04/11] Fix find_unbound_irq in presence of ioapic irqs.
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Mon, 24 May 2010 19:27:30 +0100
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Don Dutile <ddutile@xxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Mon, 24 May 2010 11:31:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <alpine.DEB.2.00.1005241615300.25605@kaball-desktop>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <alpine.DEB.2.00.1005241615300.25605@kaball-desktop>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 drivers/xen/events.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 8b68fc4..1356fa2 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -339,9 +339,18 @@ static int find_unbound_irq(void)
        int irq;
        struct irq_desc *desc;
 
-       for (irq = 0; irq < nr_irqs; irq++)
+       for (irq = 0; irq < nr_irqs; irq++) {
+               desc = irq_to_desc(irq);
+               /* only 0->15 have init'd desc; handle irq > 16 */
+               if (desc == NULL)
+                       break;
+               if (desc->chip == &no_irq_chip)
+                       break;
+               if (desc->chip != &xen_dynamic_chip)
+                       continue;
                if (irq_info[irq].type == IRQT_UNBOUND)
                        break;
+       }
 
        if (irq == nr_irqs)
                panic("No available IRQ to bind to: increase nr_irqs!\n");
-- 
1.5.4.3


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

<Prev in Thread] Current Thread [Next in Thread>