From: Yinghai Lu Date: Wed, 25 Jun 2008 05:13:15 +0000 (-0700) Subject: x86: numa 32 using apicid_2_node to get node for logical_apicid X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f47f9d538ecc938bed589e9d39ad7b454f3b506c;p=openwrt%2Fstaging%2Fblogic.git x86: numa 32 using apicid_2_node to get node for logical_apicid Signed-off-by: Yinghai Lu Signed-off-by: Ingo Molnar --- diff --git a/include/asm-x86/mach-bigsmp/mach_apic.h b/include/asm-x86/mach-bigsmp/mach_apic.h index 8327907c79bf..017c8c19ad8f 100644 --- a/include/asm-x86/mach-bigsmp/mach_apic.h +++ b/include/asm-x86/mach-bigsmp/mach_apic.h @@ -81,7 +81,7 @@ static inline int multi_timer_check(int apic, int irq) 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) diff --git a/include/asm-x86/mach-default/mach_apic.h b/include/asm-x86/mach-default/mach_apic.h index 21003b56ae95..0b2cde5e1b74 100644 --- a/include/asm-x86/mach-default/mach_apic.h +++ b/include/asm-x86/mach-default/mach_apic.h @@ -77,7 +77,11 @@ static inline void setup_apic_routing(void) 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