All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/sfi: fix ioapic gsi range
@ 2010-06-07 23:07 Jacob Pan
  2010-06-08  0:01 ` jacob pan
  2010-06-08  0:24 ` Eric W. Biederman
  0 siblings, 2 replies; 26+ messages in thread
From: Jacob Pan @ 2010-06-07 23:07 UTC (permalink / raw)
  To: Alan Cox, Arjan van de Ven, LKML, H. Peter Anvin, Ingo Molnar,
	Feng Tang, Len Brown, Eric W. Biederman
  Cc: Jacob Pan

SFI based platforms should have zero based gsi_base for IOAPICs found in SFI
tables. The current code sets gsi_base starting from 1 when registering ioapic.
The result is that Moorestown platform would have wrong mp_gsi_routing for each
ioapic.

Background:
In Moorestown/Medfield platforms, there is no legacy IRQs, all gsis and irqs
are one to one mapped, including those < 16. Specifically, IRQ0 and IRQ1 are
used for per-cpu timers. So without this patch, IOAPIC pin to IRQ mapping is
off by one.

Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
---
 arch/x86/kernel/sfi.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/sfi.c b/arch/x86/kernel/sfi.c
index 7ded578..8d31950 100644
--- a/arch/x86/kernel/sfi.c
+++ b/arch/x86/kernel/sfi.c
@@ -87,14 +87,17 @@ static int __init sfi_parse_ioapic(struct sfi_table_header *table)
 	struct sfi_table_simple *sb;
 	struct sfi_apic_table_entry *pentry;
 	int i, num;
+	u32 gsi_base;
 
 	sb = (struct sfi_table_simple *)table;
 	num = SFI_GET_NUM_ENTRIES(sb, struct sfi_apic_table_entry);
 	pentry = (struct sfi_apic_table_entry *)sb->pentry;
 
+	gsi_base = gsi_end;
 	for (i = 0; i < num; i++) {
-		mp_register_ioapic(i, pentry->phys_addr, gsi_end + 1);
+		mp_register_ioapic(i, pentry->phys_addr, gsi_base);
 		pentry++;
+		gsi_base = gsi_end + 1;
 	}
 
 	WARN(pic_mode, KERN_WARNING
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2010-06-10 14:40 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-07 23:07 [PATCH] x86/sfi: fix ioapic gsi range Jacob Pan
2010-06-08  0:01 ` jacob pan
2010-06-08  0:24 ` Eric W. Biederman
2010-06-08  0:30   ` H. Peter Anvin
2010-06-08  1:10     ` Eric W. Biederman
2010-06-08  8:10     ` Alan Cox
2010-06-08 18:11       ` H. Peter Anvin
2010-06-08 20:04         ` Eric W. Biederman
2010-06-08 18:44     ` [PATCH] x86/irq: Rename gsi_end gsi_top, and fix off by one errors Eric W. Biederman
2010-06-09 22:06       ` [tip:x86/urgent] x86, irq: " tip-bot for Eric W. Biederman
2010-06-08  5:50   ` [PATCH] x86/sfi: fix ioapic gsi range jacob pan
2010-06-08 19:41     ` Eric W. Biederman
2010-06-08 19:12       ` Alan Cox
2010-06-08 20:56         ` Yuhong Bao
2010-06-08 22:16           ` Eric W. Biederman
2010-06-08 22:29             ` Alan Cox
2010-06-08 20:36       ` H. Peter Anvin
2010-06-08 20:59         ` Eric W. Biederman
2010-06-08 21:08           ` H. Peter Anvin
2010-06-08 21:51             ` Eric W. Biederman
2010-06-08 20:41       ` jacob pan
2010-06-08 21:22         ` Eric W. Biederman
2010-06-08 22:17           ` jacob pan
2010-06-09 23:44             ` Eric W. Biederman
2010-06-10  8:40               ` jacob pan
2010-06-10 14:39                 ` Eric W. Biederman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.