aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Pan <jacob.jun.pan@linux.intel.com>2010-12-08 10:57:10 +0000
committerAlan Cox <alan@linux.intel.com>2010-12-08 10:57:10 +0000
commit90bb8d4688f3d51a4aa1ffea1b6a129c796ff211 (patch)
treecc37179de15cd27edd92001e9ca938bfc9561f1d
parente9bc7c2146f1e70c7ae138ac9fef5e6e3c7561db (diff)
downloadmrst-s0i3-test-90bb8d4688f3d51a4aa1ffea1b6a129c796ff211.tar.gz
mrst-s0i3-test-90bb8d4688f3d51a4aa1ffea1b6a129c796ff211.tar.xz
mrst-s0i3-test-90bb8d4688f3d51a4aa1ffea1b6a129c796ff211.zip
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>
-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 7cc0a721f62..162677e3eb5 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -938,7 +938,7 @@ static int pin_2_irq(int idx, int apic, int pin)
} else {
u32 gsi = mp_gsi_routing[apic].gsi_base + pin;
- if (gsi >= NR_IRQS_LEGACY)
+ if (gsi >= legacy_pic->nr_legacy_irqs)
irq = gsi;
else
irq = gsi_top + gsi;
@@ -3643,7 +3643,7 @@ void __init probe_nr_irqs_gsi(void)
{
int nr;
- nr = gsi_top + NR_IRQS_LEGACY;
+ nr = gsi_top + legacy_pic->nr_legacy_irqs;
if (nr > nr_irqs_gsi)
nr_irqs_gsi = nr;