diff options
-rw-r--r-- | arch/powerpc/kernel/smp.c | 10 | ||||
-rw-r--r-- | arch/powerpc/mm/numa.c | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 4866d5dbd420..71e186d5f331 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -380,8 +380,11 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
380 | /* | 380 | /* |
381 | * numa_node_id() works after this. | 381 | * numa_node_id() works after this. |
382 | */ | 382 | */ |
383 | set_cpu_numa_node(cpu, numa_cpu_lookup_table[cpu]); | 383 | if (cpu_present(cpu)) { |
384 | set_cpu_numa_mem(cpu, local_memory_node(numa_cpu_lookup_table[cpu])); | 384 | set_cpu_numa_node(cpu, numa_cpu_lookup_table[cpu]); |
385 | set_cpu_numa_mem(cpu, | ||
386 | local_memory_node(numa_cpu_lookup_table[cpu])); | ||
387 | } | ||
385 | } | 388 | } |
386 | 389 | ||
387 | cpumask_set_cpu(boot_cpuid, cpu_sibling_mask(boot_cpuid)); | 390 | cpumask_set_cpu(boot_cpuid, cpu_sibling_mask(boot_cpuid)); |
@@ -729,6 +732,9 @@ void start_secondary(void *unused) | |||
729 | } | 732 | } |
730 | traverse_core_siblings(cpu, true); | 733 | traverse_core_siblings(cpu, true); |
731 | 734 | ||
735 | set_numa_node(numa_cpu_lookup_table[cpu]); | ||
736 | set_numa_mem(local_memory_node(numa_cpu_lookup_table[cpu])); | ||
737 | |||
732 | smp_wmb(); | 738 | smp_wmb(); |
733 | notify_cpu_starting(cpu); | 739 | notify_cpu_starting(cpu); |
734 | set_cpu_online(cpu, true); | 740 | set_cpu_online(cpu, true); |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 9918c0200857..3a9061e9f5dd 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -1127,7 +1127,7 @@ void __init do_init_bootmem(void) | |||
1127 | * even before we online them, so that we can use cpu_to_{node,mem} | 1127 | * even before we online them, so that we can use cpu_to_{node,mem} |
1128 | * early in boot, cf. smp_prepare_cpus(). | 1128 | * early in boot, cf. smp_prepare_cpus(). |
1129 | */ | 1129 | */ |
1130 | for_each_possible_cpu(cpu) { | 1130 | for_each_present_cpu(cpu) { |
1131 | numa_setup_cpu((unsigned long)cpu); | 1131 | numa_setup_cpu((unsigned long)cpu); |
1132 | } | 1132 | } |
1133 | } | 1133 | } |