|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 07/12] Fix find_unbound_irq in presence of ioapic irq
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Don't break the assumption that the first 16 irqs are ISA irqs;
make sure that the irq is actually free before using it.
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 4bd0ea3..b233564 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -340,9 +340,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.7.0.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- Re: [Xen-devel] [PATCH 03/12] evtchn delivery on HVM, (continued)
[Xen-devel] [PATCH 04/12] Xen PCI platform device driver, stefano . stabellini
[Xen-devel] [PATCH 05/12] Add suspend\resume support for PV on HVM guests., stefano . stabellini
[Xen-devel] [PATCH 06/12] Allow xen platform pci device to be compiled as a module, stefano . stabellini
[Xen-devel] [PATCH 07/12] Fix find_unbound_irq in presence of ioapic irqs.,
stefano . stabellini <=
[Xen-devel] [PATCH 08/12] Fix possible NULL pointer dereference in print_IO_APIC, stefano . stabellini
[Xen-devel] [PATCH 09/12] __setup_vector_irq: handle NULL chip_data, stefano . stabellini
[Xen-devel] [PATCH 10/12] Do not try to disable hpet if it hasn't been initialized before, stefano . stabellini
[Xen-devel] [PATCH 11/12] Use xen_vcpuop_clockevent, xen_clocksource and xen wallclock., stefano . stabellini
[Xen-devel] [PATCH 12/12] Unplug emulated disks and nics, stefano . stabellini
|
|
|
|
|