aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorJacob Pan <jacob.jun.pan@linux.intel.com>2012-01-26 12:32:04 -0500
committerIngo Molnar <mingo@elte.hu>2012-01-26 15:23:50 -0500
commitb3eea29c189a0e3e2ac921e85fabfa4989ee58d7 (patch)
treed75c6cd4f090444d5f3f433e1bd909db5c83a777 /arch/x86
parent87f71ae2dd7471c1b4c94100be1f218e91dc64c3 (diff)
x86/ioapic: Use legacy_pic to set correct gsi-irq mapping
Using compile time NR_LEGACY_IRQS causes the wrong gsi-irq mapping on non-PC platforms, such as Moorestown. This patch uses legacy_pic abstraction to set the correct number of legacy interrupts at runtime. For Moorestown, nr_legacy_irqs = 0. We have 1:1 mapping for gsi-irq even within the legacy irq range. Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: Dirk Brandewie <dirk.brandewie@gmail.com> Link: http://lkml.kernel.org/n/tip-kzvj4xp9tmicuoqoh2w05iay@git.kernel.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/apic/io_apic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index fb072754bc1d..9e753663f0d1 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1010,7 +1010,7 @@ static int pin_2_irq(int idx, int apic, int pin)
1010 } else { 1010 } else {
1011 u32 gsi = gsi_cfg->gsi_base + pin; 1011 u32 gsi = gsi_cfg->gsi_base + pin;
1012 1012
1013 if (gsi >= NR_IRQS_LEGACY) 1013 if (gsi >= legacy_pic->nr_legacy_irqs)
1014 irq = gsi; 1014 irq = gsi;
1015 else 1015 else
1016 irq = gsi_top + gsi; 1016 irq = gsi_top + gsi;
@@ -3610,7 +3610,7 @@ static void __init probe_nr_irqs_gsi(void)
3610{ 3610{
3611 int nr; 3611 int nr;
3612 3612
3613 nr = gsi_top + NR_IRQS_LEGACY; 3613 nr = gsi_top + legacy_pic->nr_legacy_irqs;
3614 if (nr > nr_irqs_gsi) 3614 if (nr > nr_irqs_gsi)
3615 nr_irqs_gsi = nr; 3615 nr_irqs_gsi = nr;
3616 3616