linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tip:x86/platform] x86/ioapic: Use legacy_pic to set correct gsi-irq mapping
@ 2012-01-26 21:39 tip-bot for Jacob Pan
  0 siblings, 0 replies; only message in thread
From: tip-bot for Jacob Pan @ 2012-01-26 21:39 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, dirk.brandewie, tglx, jacob.jun.pan, mingo

Commit-ID:  b3eea29c189a0e3e2ac921e85fabfa4989ee58d7
Gitweb:     http://git.kernel.org/tip/b3eea29c189a0e3e2ac921e85fabfa4989ee58d7
Author:     Jacob Pan <jacob.jun.pan@linux.intel.com>
AuthorDate: Thu, 26 Jan 2012 17:32:04 +0000
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 26 Jan 2012 21:23:50 +0100

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>
---
 arch/x86/kernel/apic/io_apic.c |    4 ++--
 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 fb07275..9e75366 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)
 	} else {
 		u32 gsi = gsi_cfg->gsi_base + pin;
 
-		if (gsi >= NR_IRQS_LEGACY)
+		if (gsi >= legacy_pic->nr_legacy_irqs)
 			irq = gsi;
 		else
 			irq = gsi_top + gsi;
@@ -3610,7 +3610,7 @@ static 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;
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-01-26 21:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-26 21:39 [tip:x86/platform] x86/ioapic: Use legacy_pic to set correct gsi-irq mapping tip-bot for Jacob Pan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).