aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/acpi/boot.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 298f79616f1c..f3bafcd32b98 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -366,6 +366,13 @@ static void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger,
366 366
367 mp_save_irq(&mp_irq); 367 mp_save_irq(&mp_irq);
368 368
369 /*
370 * Reset default identity mapping if gsi is also an legacy IRQ,
371 * otherwise there will be more than one entry with the same GSI
372 * and acpi_isa_irq_to_gsi() may give wrong result.
373 */
374 if (gsi < NR_IRQS_LEGACY && isa_irq_to_gsi[gsi] == gsi)
375 isa_irq_to_gsi[gsi] = ACPI_INVALID_GSI;
369 isa_irq_to_gsi[bus_irq] = gsi; 376 isa_irq_to_gsi[bus_irq] = gsi;
370} 377}
371 378
@@ -621,7 +628,8 @@ EXPORT_SYMBOL_GPL(acpi_gsi_to_irq);
621 628
622int acpi_isa_irq_to_gsi(unsigned isa_irq, u32 *gsi) 629int acpi_isa_irq_to_gsi(unsigned isa_irq, u32 *gsi)
623{ 630{
624 if (isa_irq < NR_IRQS_LEGACY) { 631 if (isa_irq < NR_IRQS_LEGACY &&
632 isa_irq_to_gsi[isa_irq] != ACPI_INVALID_GSI) {
625 *gsi = isa_irq_to_gsi[isa_irq]; 633 *gsi = isa_irq_to_gsi[isa_irq];
626 return 0; 634 return 0;
627 } 635 }