diff options
author | Tejun Heo <tj@kernel.org> | 2011-01-23 08:37:42 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-01-28 08:54:10 -0500 |
commit | 8db78cc4b4048e3add40bca1bc3e55057c319256 (patch) | |
tree | 16779c36de4baba8add96402a6331820df735f2c /arch/x86/include/asm/numa_64.h | |
parent | de2d9445f1627830ed2ebd00ee9d851986c940b5 (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_64.h')
-rw-r--r-- | arch/x86/include/asm/numa_64.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/x86/include/asm/numa_64.h b/arch/x86/include/asm/numa_64.h index 123f1856101c..2819afa33632 100644 --- a/arch/x86/include/asm/numa_64.h +++ b/arch/x86/include/asm/numa_64.h | |||
@@ -13,7 +13,6 @@ extern int compute_hash_shift(struct bootnode *nodes, int numblks, | |||
13 | 13 | ||
14 | #define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT)) | 14 | #define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT)) |
15 | 15 | ||
16 | extern void numa_init_array(void); | ||
17 | extern int numa_off; | 16 | extern int numa_off; |
18 | 17 | ||
19 | extern unsigned long numa_free_all_bootmem(void); | 18 | extern unsigned long numa_free_all_bootmem(void); |
@@ -28,7 +27,6 @@ extern void setup_node_bootmem(int nodeid, unsigned long start, | |||
28 | */ | 27 | */ |
29 | #define NODE_MIN_SIZE (4*1024*1024) | 28 | #define NODE_MIN_SIZE (4*1024*1024) |
30 | 29 | ||
31 | extern void __init init_cpu_to_node(void); | ||
32 | extern int __cpuinit numa_cpu_node(int cpu); | 30 | extern int __cpuinit numa_cpu_node(int cpu); |
33 | 31 | ||
34 | #ifdef CONFIG_NUMA_EMU | 32 | #ifdef CONFIG_NUMA_EMU |
@@ -37,7 +35,6 @@ extern int __cpuinit numa_cpu_node(int cpu); | |||
37 | void numa_emu_cmdline(char *); | 35 | void numa_emu_cmdline(char *); |
38 | #endif /* CONFIG_NUMA_EMU */ | 36 | #endif /* CONFIG_NUMA_EMU */ |
39 | #else | 37 | #else |
40 | static inline void init_cpu_to_node(void) { } | ||
41 | static inline int numa_cpu_node(int cpu) { return NUMA_NO_NODE; } | 38 | static inline int numa_cpu_node(int cpu) { return NUMA_NO_NODE; } |
42 | #endif | 39 | #endif |
43 | 40 | ||