From 4593f5fcdb9a11b5a075f470d3c75d04c82e180d Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 10 Mar 2009 10:12:30 +0100 Subject: [PATCH] xen: fix legacy irq setup, make ioapic-less machines work. If the machine has no IO APICs, then just allocate a set of legacy interrupts. [ Impact: fix Xen compatibility with old machines ] Signed-off-by: Gerd Hoffmann Signed-off-by: Jeremy Fitzhardinge --- arch/x86/xen/pci.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/xen/pci.c b/arch/x86/xen/pci.c index 76c35b854bb..07b59fec12a 100644 --- a/arch/x86/xen/pci.c +++ b/arch/x86/xen/pci.c @@ -66,8 +66,14 @@ void __init xen_setup_pirqs(void) { int irq; + if (0 == nr_ioapics) { + for (irq = 0; irq < NR_IRQS_LEGACY; irq++) + xen_allocate_pirq(irq, "xt-pic"); + return; + } + /* Pre-allocate legacy irqs */ - for (irq=0; irq < NR_IRQS_LEGACY; irq++) { + for (irq = 0; irq < NR_IRQS_LEGACY; irq++) { int trigger, polarity; if (acpi_get_override_irq(irq, &trigger, &polarity) == -1) -- 2.39.5