aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2010-03-30 04:07:02 -0400
committerH. Peter Anvin <hpa@zytor.com>2010-05-04 16:34:23 -0400
commit2c2df8418ac7908eec4558407b83f16739006c54 (patch)
treebfd1056e37871bf504f6e2820482e6c2b0a9a0d5 /arch
parentd93ac51c7a129db7a1431d859a3ef45a0b1f3fc5 (diff)
x86, acpi/irq: Introduce apci_isa_irq_to_gsi
There are a number of cases where the current code makes the assumption that isa irqs identity map to the first 16 acpi global system intereupts. In most instances that assumption is correct as that is the required behaviour in dual i8259 mode and the default behavior in ioapic mode. However there are some systems out there that take advantage of acpis interrupt remapping for the isa irqs to have a completely different mapping of isa_irq to gsi. Introduce acpi_isa_irq_to_gsi to perform this mapping explicitly in the code that needs it. Initially this will be just the current assumed identity mapping to ensure it's introduction does not cause regressions. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> LKML-Reference: <1269936436-7039-1-git-send-email-ebiederm@xmission.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/kernel/acpi.c8
-rw-r--r--arch/x86/kernel/acpi/boot.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 4d1a7e9314cf..c6c90f39f4d9 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -785,6 +785,14 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
785 return 0; 785 return 0;
786} 786}
787 787
788int acpi_isa_irq_to_gsi(unsigned isa_irq, u32 *gsi)
789{
790 if (isa_irq >= 16)
791 return -1;
792 *gsi = isa_irq;
793 return 0;
794}
795
788/* 796/*
789 * ACPI based hotplug CPU support 797 * ACPI based hotplug CPU support
790 */ 798 */
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index cd40aba6aa95..da718d672596 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -458,6 +458,14 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
458 return 0; 458 return 0;
459} 459}
460 460
461int acpi_isa_irq_to_gsi(unsigned isa_irq, u32 *gsi)
462{
463 if (isa_irq >= 16)
464 return -1;
465 *gsi = isa_irq;
466 return 0;
467}
468
461/* 469/*
462 * success: return IRQ number (>=0) 470 * success: return IRQ number (>=0)
463 * failure: return < 0 471 * failure: return < 0