diff options
-rw-r--r-- | arch/x86/kernel/setup_percpu.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c index de3b63ae3da2..690c2c09faf3 100644 --- a/arch/x86/kernel/setup_percpu.c +++ b/arch/x86/kernel/setup_percpu.c | |||
@@ -238,6 +238,15 @@ void __init setup_per_cpu_areas(void) | |||
238 | #ifdef CONFIG_NUMA | 238 | #ifdef CONFIG_NUMA |
239 | per_cpu(x86_cpu_to_node_map, cpu) = | 239 | per_cpu(x86_cpu_to_node_map, cpu) = |
240 | early_per_cpu_map(x86_cpu_to_node_map, cpu); | 240 | early_per_cpu_map(x86_cpu_to_node_map, cpu); |
241 | /* | ||
242 | * Ensure taht the boot cpu numa_node is correct when the boot | ||
243 | * cpu is on a node that doesn't have memory installed. | ||
244 | * Also cpu_up() will call cpu_to_node() for APs when | ||
245 | * MEMORY_HOTPLUG is defined, before per_cpu(numa_node) is set | ||
246 | * up later with c_init aka intel_init/amd_init. | ||
247 | * So set them all (boot cpu and all APs). | ||
248 | */ | ||
249 | set_cpu_numa_node(cpu, early_cpu_to_node(cpu)); | ||
241 | #endif | 250 | #endif |
242 | #endif | 251 | #endif |
243 | /* | 252 | /* |
@@ -257,14 +266,6 @@ void __init setup_per_cpu_areas(void) | |||
257 | early_per_cpu_ptr(x86_cpu_to_node_map) = NULL; | 266 | early_per_cpu_ptr(x86_cpu_to_node_map) = NULL; |
258 | #endif | 267 | #endif |
259 | 268 | ||
260 | #if defined(CONFIG_X86_64) && defined(CONFIG_NUMA) | ||
261 | /* | ||
262 | * make sure boot cpu numa_node is right, when boot cpu is on the | ||
263 | * node that doesn't have mem installed | ||
264 | */ | ||
265 | set_cpu_numa_node(boot_cpu_id, early_cpu_to_node(boot_cpu_id)); | ||
266 | #endif | ||
267 | |||
268 | /* Setup node to cpumask map */ | 269 | /* Setup node to cpumask map */ |
269 | setup_node_to_cpumask_map(); | 270 | setup_node_to_cpumask_map(); |
270 | 271 | ||