[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200806242213.15310.yhlu.kernel@gmail.com>
Date: Tue, 24 Jun 2008 22:13:15 -0700
From: Yinghai Lu <yhlu.kernel@...il.com>
To: Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] x86: numa 32 using apicid_2_node to get node for logical_apicid
Signed-off-by: Yinghai Lu <yhlu.kernel@...il.com>
---
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists