Commit 3bf7d0328640474509d6345f9c3356e08bebf585
Committed by
Greg Kroah-Hartman
1 parent
039f0813ad
Exists in
smarct4x-processor-sdk-linux-03.00.00.04
and in
2 other branches
xen/x86: actually allocate legacy interrupts on PV guests
commit 702f926067d2a4b28c10a3c41a1172dd62d9e735 upstream. b4ff8389ed14 is incomplete: relies on nr_legacy_irqs() to get the number of legacy interrupts when actually nr_legacy_irqs() returns 0 after probe_8259A(). Use NR_IRQS_LEGACY instead. Signed-off-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing 1 changed file with 5 additions and 2 deletions Side-by-side Diff
arch/x86/pci/xen.c
... | ... | @@ -488,8 +488,11 @@ |
488 | 488 | #endif |
489 | 489 | __acpi_register_gsi = acpi_register_gsi_xen; |
490 | 490 | __acpi_unregister_gsi = NULL; |
491 | - /* Pre-allocate legacy irqs */ | |
492 | - for (irq = 0; irq < nr_legacy_irqs(); irq++) { | |
491 | + /* | |
492 | + * Pre-allocate the legacy IRQs. Use NR_LEGACY_IRQS here | |
493 | + * because we don't have a PIC and thus nr_legacy_irqs() is zero. | |
494 | + */ | |
495 | + for (irq = 0; irq < NR_IRQS_LEGACY; irq++) { | |
493 | 496 | int trigger, polarity; |
494 | 497 | |
495 | 498 | if (acpi_get_override_irq(irq, &trigger, &polarity) == -1) |