[PATCH 2/3]: ppc64: use generic nr_cpus_node

Anton Blanchard anton at samba.org
Thu Sep 29 17:27:53 EST 2005


Remove the ppc64 specific nr_cpus_node and use the generic version
instead.

Signed-off-by: Anton Blanchard <anton at samba.org>
---

Index: build/include/asm-powerpc/topology.h
===================================================================
--- build.orig/include/asm-powerpc/topology.h	2005-09-10 12:40:58.000000000 +1000
+++ build/include/asm-powerpc/topology.h	2005-09-10 13:13:07.000000000 +1000
@@ -37,8 +37,6 @@
 #define pcibus_to_node(node)    (-1)
 #define pcibus_to_cpumask(bus)	(cpu_online_map)
 
-#define nr_cpus_node(node)	(nr_cpus_in_node[node])
-
 /* sched_domains SD_NODE_INIT for PPC64 machines */
 #define SD_NODE_INIT (struct sched_domain) {		\
 	.span			= CPU_MASK_NONE,	\
Index: build/arch/ppc64/mm/numa.c
===================================================================
--- build.orig/arch/ppc64/mm/numa.c	2005-09-10 12:40:54.000000000 +1000
+++ build/arch/ppc64/mm/numa.c	2005-09-10 13:13:07.000000000 +1000
@@ -36,7 +36,6 @@
 	ARRAY_INITIALISER};
 char *numa_memory_lookup_table;
 cpumask_t numa_cpumask_lookup_table[MAX_NUMNODES];
-int nr_cpus_in_node[MAX_NUMNODES] = { [0 ... (MAX_NUMNODES -1)] = 0};
 
 struct pglist_data *node_data[MAX_NUMNODES];
 bootmem_data_t __initdata plat_node_bdata[MAX_NUMNODES];
@@ -56,14 +55,12 @@
 EXPORT_SYMBOL(numa_cpu_lookup_table);
 EXPORT_SYMBOL(numa_memory_lookup_table);
 EXPORT_SYMBOL(numa_cpumask_lookup_table);
-EXPORT_SYMBOL(nr_cpus_in_node);
 
 static inline void map_cpu_to_node(int cpu, int node)
 {
 	numa_cpu_lookup_table[cpu] = node;
 	if (!(cpu_isset(cpu, numa_cpumask_lookup_table[node]))) {
 		cpu_set(cpu, numa_cpumask_lookup_table[node]);
-		nr_cpus_in_node[node]++;
 	}
 }
 
@@ -76,7 +73,6 @@
 
 	if (cpu_isset(cpu, numa_cpumask_lookup_table[node])) {
 		cpu_clear(cpu, numa_cpumask_lookup_table[node]);
-		nr_cpus_in_node[node]--;
 	} else {
 		printk(KERN_ERR "WARNING: cpu %lu not found in node %d\n",
 		       cpu, node);
Index: build/include/asm-ppc64/mmzone.h
===================================================================
--- build.orig/include/asm-ppc64/mmzone.h	2005-09-10 13:12:32.000000000 +1000
+++ build/include/asm-ppc64/mmzone.h	2005-09-10 13:13:07.000000000 +1000
@@ -32,7 +32,6 @@
 extern int numa_cpu_lookup_table[];
 extern char *numa_memory_lookup_table;
 extern cpumask_t numa_cpumask_lookup_table[];
-extern int nr_cpus_in_node[];
 
 /* 16MB regions */
 #define MEMORY_INCREMENT_SHIFT 24



More information about the Linuxppc64-dev mailing list