aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorkeith mannthey <kmannth@us.ibm.com>2006-09-29 04:58:46 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 12:18:03 -0400
commit3b08606dc2991bcdab14139efd9ed9d492f5f901 (patch)
treec225c9fc5a7b3cdfe516c4279f77e40068396162 /include
parent3528a95322b5c1ce882ab723f175a1845430cd89 (diff)
[PATCH] convert i386 Summit subarch to use SRAT info for apicid_to_node calls
Convert the i386 summit subarch apicid_to_node to use node information provided by the SRAT. It was discussed a little on LKML a few weeks ago and was seen as an acceptable fix. The current way of obtaining the nodeid static inline int apicid_to_node(int logical_apicid) { return logical_apicid >> 5; } is just not correct for all summit systems/bios. Assuming the apicid matches the Linux node number require a leap of faith that the bios mapped out the apicids a set way. Modern summit HW (IBM x460) does not layout its bios in the manner for various reasons and is unable to boot i386 numa. The best way to get the correct apicid to node information is from the SRAT table during boot. It lays out what apicid belongs to what node. I use this information to create a table for use at run time. Signed-off-by: Keith Mannthey <kmannth@us.ibm.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/mach-summit/mach_apic.h2
-rw-r--r--include/asm-i386/smp.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/include/asm-i386/mach-summit/mach_apic.h b/include/asm-i386/mach-summit/mach_apic.h
index a81b05961595..254a0fe01c6a 100644
--- a/include/asm-i386/mach-summit/mach_apic.h
+++ b/include/asm-i386/mach-summit/mach_apic.h
@@ -88,7 +88,7 @@ static inline void clustered_apic_check(void)
88 88
89static inline int apicid_to_node(int logical_apicid) 89static inline int apicid_to_node(int logical_apicid)
90{ 90{
91 return logical_apicid >> 5; /* 2 clusterids per CEC */ 91 return apicid_2_node[logical_apicid];
92} 92}
93 93
94/* Mapping from cpu number to logical apicid */ 94/* Mapping from cpu number to logical apicid */
diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h
index 32ac8c91d5c5..915c26a31b79 100644
--- a/include/asm-i386/smp.h
+++ b/include/asm-i386/smp.h
@@ -46,6 +46,8 @@ extern u8 x86_cpu_to_apicid[];
46 46
47#define cpu_physical_id(cpu) x86_cpu_to_apicid[cpu] 47#define cpu_physical_id(cpu) x86_cpu_to_apicid[cpu]
48 48
49extern u8 apicid_2_node[];
50
49#ifdef CONFIG_HOTPLUG_CPU 51#ifdef CONFIG_HOTPLUG_CPU
50extern void cpu_exit_clear(void); 52extern void cpu_exit_clear(void);
51extern void cpu_uninit(void); 53extern void cpu_uninit(void);