aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/numa.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-01-23 08:37:42 -0500
committerIngo Molnar <mingo@elte.hu>2011-01-28 08:54:10 -0500
commit8db78cc4b4048e3add40bca1bc3e55057c319256 (patch)
tree16779c36de4baba8add96402a6331820df735f2c /arch/x86/include/asm/numa.h
parentde2d9445f1627830ed2ebd00ee9d851986c940b5 (diff)
x86: Unify NUMA initialization between 32 and 64bit
Now that everything else is unified, NUMA initialization can be unified too. * numa_init_array() and init_cpu_to_node() are moved from numa_64 to numa. * numa_32::initmem_init() is updated to call numa_init_array() and setup_arch() to call init_cpu_to_node() on 32bit too. * x86_cpu_to_node_map is now initialized to NUMA_NO_NODE on 32bit too. This is safe now as numa_init_array() will initialize it early during boot. This makes NUMA mapping fully initialized before setup_per_cpu_areas() on 32bit too and thus makes the first percpu chunk which contains all the static variables and some of dynamic area allocated with NUMA affinity correctly considered. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: yinghai@kernel.org Cc: brgerst@gmail.com Cc: gorcunov@gmail.com Cc: shaohui.zheng@intel.com Cc: rientjes@google.com LKML-Reference: <1295789862-25482-17-git-send-email-tj@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Reported-by: Eric Dumazet <eric.dumazet@gmail.com> Reviewed-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/numa.h')
-rw-r--r--arch/x86/include/asm/numa.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/include/asm/numa.h b/arch/x86/include/asm/numa.h
index d3964b28b128..26fc6e2dd0fb 100644
--- a/arch/x86/include/asm/numa.h
+++ b/arch/x86/include/asm/numa.h
@@ -34,11 +34,15 @@ static inline void set_apicid_to_node(int apicid, s16 node)
34#ifdef CONFIG_NUMA 34#ifdef CONFIG_NUMA
35extern void __cpuinit numa_set_node(int cpu, int node); 35extern void __cpuinit numa_set_node(int cpu, int node);
36extern void __cpuinit numa_clear_node(int cpu); 36extern void __cpuinit numa_clear_node(int cpu);
37extern void __init numa_init_array(void);
38extern void __init init_cpu_to_node(void);
37extern void __cpuinit numa_add_cpu(int cpu); 39extern void __cpuinit numa_add_cpu(int cpu);
38extern void __cpuinit numa_remove_cpu(int cpu); 40extern void __cpuinit numa_remove_cpu(int cpu);
39#else /* CONFIG_NUMA */ 41#else /* CONFIG_NUMA */
40static inline void numa_set_node(int cpu, int node) { } 42static inline void numa_set_node(int cpu, int node) { }
41static inline void numa_clear_node(int cpu) { } 43static inline void numa_clear_node(int cpu) { }
44static inline void numa_init_array(void) { }
45static inline void init_cpu_to_node(void) { }
42static inline void numa_add_cpu(int cpu) { } 46static inline void numa_add_cpu(int cpu) { }
43static inline void numa_remove_cpu(int cpu) { } 47static inline void numa_remove_cpu(int cpu) { }
44#endif /* CONFIG_NUMA */ 48#endif /* CONFIG_NUMA */