[PATCH] x86: numa 32 using apicid_2_node to get node for logical_apicid

From: Yinghai Lu
Date: Wed Jun 25 2008 - 01:13:29 EST



Signed-off-by: Yinghai Lu <yhlu.kernel@xxxxxxxxx>

---
include/asm-x86/mach-bigsmp/mach_apic.h | 2 +-
include/asm-x86/mach-default/mach_apic.h | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)

Index: linux-2.6/include/asm-x86/mach-bigsmp/mach_apic.h
===================================================================
--- linux-2.6.orig/include/asm-x86/mach-bigsmp/mach_apic.h
+++ linux-2.6/include/asm-x86/mach-bigsmp/mach_apic.h
@@ -81,7 +81,7 @@ static inline int multi_timer_check(int

static inline int apicid_to_node(int logical_apicid)
{
- return (0);
+ return apicid_2_node[hard_smp_processor_id()];
}

static inline int cpu_present_to_apicid(int mps_cpu)
Index: linux-2.6/include/asm-x86/mach-default/mach_apic.h
===================================================================
--- linux-2.6.orig/include/asm-x86/mach-default/mach_apic.h
+++ linux-2.6/include/asm-x86/mach-default/mach_apic.h
@@ -77,7 +77,11 @@ static inline void setup_apic_routing(vo

static inline int apicid_to_node(int logical_apicid)
{
+#ifdef CONFIG_SMP
+ return apicid_2_node[hard_smp_processor_id()];
+#else
return 0;
+#endif
}
#endif

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/