aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2010-03-30 04:07:15 -0400
committerH. Peter Anvin <hpa@zytor.com>2010-05-04 16:35:17 -0400
commit988856ee1623bd37e384105f7bb2b7fe44c009f6 (patch)
tree399f084e7fcddd680b3873a4c9dc6b554405a867 /arch/x86/kernel/apic
parent4afc51a835d3aeba11c35090f524e05c84586d27 (diff)
x86, acpi/irq: Handle isa irqs that are not identity mapped to gsi's.
ACPI irq source overrides are allowed for the 16 isa irqs and are allowed to map any gsi to any isa irq. A few motherboards have been seen to take advantage of this and put the isa irqs on the 2nd or 3rd ioapic. This causes some problems, most notably the fact that we can not use any gsi < 16. To correct this move the gsis that are not isa irqs and have a gsi number < 16 into the linux irq space just past gsi_end. This is what the es7000 platform is doing today. Moving only the low 16 gsis above the rest of the gsi's only penalizes weird platforms, leaving sane acpi implementations with a 1-1 mapping of gsis and irqs. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> LKML-Reference: <1269936436-7039-14-git-send-email-ebiederm@xmission.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/apic')
-rw-r--r--arch/x86/kernel/apic/io_apic.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 9f3f6ca86dac..594827c3c615 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1037,7 +1037,11 @@ static int pin_2_irq(int idx, int apic, int pin)
1037 */ 1037 */
1038 if (ioapic_renumber_irq) 1038 if (ioapic_renumber_irq)
1039 gsi = ioapic_renumber_irq(apic, gsi); 1039 gsi = ioapic_renumber_irq(apic, gsi);
1040 irq = gsi; 1040
1041 if (gsi >= NR_IRQS_LEGACY)
1042 irq = gsi;
1043 else
1044 irq = gsi_end + 1 + gsi;
1041 } 1045 }
1042 1046
1043#ifdef CONFIG_X86_32 1047#ifdef CONFIG_X86_32
@@ -3852,7 +3856,7 @@ void __init probe_nr_irqs_gsi(void)
3852{ 3856{
3853 int nr; 3857 int nr;
3854 3858
3855 nr = gsi_end + 1; 3859 nr = gsi_end + 1 + NR_IRQS_LEGACY;
3856 if (nr > nr_irqs_gsi) 3860 if (nr > nr_irqs_gsi)
3857 nr_irqs_gsi = nr; 3861 nr_irqs_gsi = nr;
3858 3862