[PATCH 4/7] numa-x86_64-use-generic-percpu-var-numa_node_id-implementation-fix2

Lee Schermerhorn <[email protected]>
Newsgroups org.kernel.vger.linux-numa,org.kernel.vger.linux-arch,org.kvack.linux-mm
Message-ID <[email protected]>
Incremental patch 2 to
numa-x86_64-use-generic-percpu-var-numa_node_id-implementation.patch
in 28apr10 mmotm.

Use generic function to set numa_node for a specified cpu as
suggested by Christoph Lameter and seconded by Tejun Heo.

Signed-off-by: Lee Schermerhorn <[email protected]>

 arch/x86/kernel/setup_percpu.c |    2 +-
 arch/x86/mm/numa_64.c          |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6.34-rc5-mmotm-100428-1653/arch/x86/mm/numa_64.c
===================================================================
--- linux-2.6.34-rc5-mmotm-100428-1653.orig/arch/x86/mm/numa_64.c
+++ linux-2.6.34-rc5-mmotm-100428-1653/arch/x86/mm/numa_64.c
@@ -806,7 +806,7 @@ void __cpuinit numa_set_node(int cpu, in
 	per_cpu(x86_cpu_to_node_map, cpu) = node;
 
 	if (node != NUMA_NO_NODE)
-		per_cpu(numa_node, cpu) = node;
+		set_cpu_numa_node(cpu, node);
 }
 
 void __cpuinit numa_clear_node(int cpu)
Index: linux-2.6.34-rc5-mmotm-100428-1653/arch/x86/kernel/setup_percpu.c
===================================================================
--- linux-2.6.34-rc5-mmotm-100428-1653.orig/arch/x86/kernel/setup_percpu.c
+++ linux-2.6.34-rc5-mmotm-100428-1653/arch/x86/kernel/setup_percpu.c
@@ -268,7 +268,7 @@ void __init setup_per_cpu_areas(void)
 	 * make sure boot cpu numa_node is right, when boot cpu is on the
 	 * node that doesn't have mem installed
 	 */
-	per_cpu(numa_node, boot_cpu_id) = early_cpu_to_node(boot_cpu_id);
+	set_cpu_numa_node(boot_cpu_id, early_cpu_to_node(boot_cpu_id));
 #endif
 
 	/* Setup node to cpumask map */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.