Skip to contentSkip to conversation

Fix find_unbound_irq in presence of ioapic irqs.

PATCH In review Stefano Stabellini 1 participant 1 message May 10, 2010 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 4/11 Fix find_unbound_irq in presence of ioapic irqs.

---
 drivers/xen/events.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
drivers/xen/events.c +10 -1
index bb04824..cd609f4 100644
@@ -335,9 +335,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");
Signature · 1 line
1.5.4.3