[PATCH] ppc64: prep for NUMA sparsemem rework 2
authorAnton Blanchard <anton@samba.org>
Fri, 11 Nov 2005 03:13:20 +0000 (14:13 +1100)
committerPaul Mackerras <paulus@samba.org>
Fri, 11 Nov 2005 11:20:57 +0000 (22:20 +1100)
Remove ppc64 specific version of nr_cpus_node and use the generic one
provided.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/mm/numa.c
include/asm-powerpc/topology.h
include/asm-ppc64/mmzone.h

index da09ba03c424fb6b89ca06c795bbf2c646d5f734..c2d7fec50c92b53707aab32d036b56907318c4ac 100644 (file)
@@ -38,7 +38,6 @@ int numa_cpu_lookup_table[NR_CPUS] = { [ 0 ... (NR_CPUS - 1)] =
        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];
@@ -58,14 +57,12 @@ EXPORT_SYMBOL(node_data);
 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]++;
        }
 }
 
@@ -78,7 +75,6 @@ static void unmap_cpu_from_node(unsigned long cpu)
 
        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 2512e3836bf4de90ba130054b7a889920ab5031b..388cc9f1277f582d3ec9a9a2c1c98eb576daf646 100644 (file)
@@ -37,8 +37,6 @@ static inline int node_to_first_cpu(int node)
 #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 f6e95da96427c8fb6994474c006f5647c5f680c8..7f06afbfbabba78b2223f802202cbd44b372d3e6 100644 (file)
@@ -32,7 +32,6 @@ extern struct pglist_data *node_data[];
 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[];
 #ifdef CONFIG_MEMORY_HOTPLUG
 extern unsigned long max_pfn;
 #endif