diff options
author | Nishanth Aravamudan <nacc@linux.vnet.ibm.com> | 2014-05-19 14:14:23 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-05-27 23:35:33 -0400 |
commit | 8c272261194dfda11cc046fbe808e052f6f284eb (patch) | |
tree | 468cda65465b0f02bb1b0bf332a5bc3e8cb16538 /arch/powerpc/kernel/smp.c | |
parent | 86969cf7330a53c93edfd1bf2c28ad053e289162 (diff) |
powerpc/numa: Enable USE_PERCPU_NUMA_NODE_ID
Based off 3bccd996 for ia64, convert powerpc to use the generic per-CPU
topology tracking, specifically:
initialize per cpu numa_node entry in start_secondary
remove the powerpc cpu_to_node()
define CONFIG_USE_PERCPU_NUMA_NODE_ID if NUMA
Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/smp.c')
-rw-r--r-- | arch/powerpc/kernel/smp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index e2a4232c5871..d7252adea759 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c | |||
@@ -390,6 +390,7 @@ void smp_prepare_boot_cpu(void) | |||
390 | #ifdef CONFIG_PPC64 | 390 | #ifdef CONFIG_PPC64 |
391 | paca[boot_cpuid].__current = current; | 391 | paca[boot_cpuid].__current = current; |
392 | #endif | 392 | #endif |
393 | set_numa_node(numa_cpu_lookup_table[boot_cpuid]); | ||
393 | current_set[boot_cpuid] = task_thread_info(current); | 394 | current_set[boot_cpuid] = task_thread_info(current); |
394 | } | 395 | } |
395 | 396 | ||
@@ -750,6 +751,11 @@ void start_secondary(void *unused) | |||
750 | } | 751 | } |
751 | traverse_core_siblings(cpu, true); | 752 | traverse_core_siblings(cpu, true); |
752 | 753 | ||
754 | /* | ||
755 | * numa_node_id() works after this. | ||
756 | */ | ||
757 | set_numa_node(numa_cpu_lookup_table[cpu]); | ||
758 | |||
753 | smp_wmb(); | 759 | smp_wmb(); |
754 | notify_cpu_starting(cpu); | 760 | notify_cpu_starting(cpu); |
755 | set_cpu_online(cpu, true); | 761 | set_cpu_online(cpu, true); |