diff mbox

[RFC,2/2] powerpc/smp: use early_cpu_to_node() instead of direct references to numa_cpu_lookup_table

Message ID 20150702230332.GB2807@linux.vnet.ibm.com (mailing list archive)
State Changes Requested
Delegated to: Michael Ellerman
Headers show

Commit Message

Nishanth Aravamudan July 2, 2015, 11:03 p.m. UTC
A simple move to a wrapper function to numa_cpu_lookup_table, now that
power has the early_cpu_to_node() API.

Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>

Comments

David Rientjes July 9, 2015, 1:25 a.m. UTC | #1
On Thu, 2 Jul 2015, Nishanth Aravamudan wrote:

> A simple move to a wrapper function to numa_cpu_lookup_table, now that
> power has the early_cpu_to_node() API.
> 
> Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>

When early_cpu_to_node() is __init:

	Acked-by: David Rientjes <rientjes@google.com>
diff mbox

Patch

diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index ec9ec20..7bf333b 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -381,9 +381,9 @@  void __init smp_prepare_cpus(unsigned int max_cpus)
 		 * numa_node_id() works after this.
 		 */
 		if (cpu_present(cpu)) {
-			set_cpu_numa_node(cpu, numa_cpu_lookup_table[cpu]);
+			set_cpu_numa_node(cpu, early_cpu_to_node(cpu));
 			set_cpu_numa_mem(cpu,
-				local_memory_node(numa_cpu_lookup_table[cpu]));
+				local_memory_node(early_cpu_to_node(cpu)));
 		}
 	}
 
@@ -400,7 +400,7 @@  void smp_prepare_boot_cpu(void)
 #ifdef CONFIG_PPC64
 	paca[boot_cpuid].__current = current;
 #endif
-	set_numa_node(numa_cpu_lookup_table[boot_cpuid]);
+	set_numa_node(early_cpu_to_node(boot_cpuid));
 	current_set[boot_cpuid] = task_thread_info(current);
 }