diff options
author | Anton Blanchard <anton@samba.org> | 2005-11-10 22:13:20 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-11 06:20:57 -0500 |
commit | 3e66c4def14aa64ee6d1d4ef077d789abc30125d (patch) | |
tree | 76787962cb442e7f7f38990d7460ac8e888dd355 | |
parent | c0d33403ad39f4e945dd5b3febe5c1f94a9a1d29 (diff) |
[PATCH] ppc64: prep for NUMA sparsemem rework 2
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>
-rw-r--r-- | arch/powerpc/mm/numa.c | 4 | ||||
-rw-r--r-- | include/asm-powerpc/topology.h | 2 | ||||
-rw-r--r-- | include/asm-ppc64/mmzone.h | 1 |
3 files changed, 0 insertions, 7 deletions
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index da09ba03c424..c2d7fec50c92 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -38,7 +38,6 @@ int numa_cpu_lookup_table[NR_CPUS] = { [ 0 ... (NR_CPUS - 1)] = | |||
38 | ARRAY_INITIALISER}; | 38 | ARRAY_INITIALISER}; |
39 | char *numa_memory_lookup_table; | 39 | char *numa_memory_lookup_table; |
40 | cpumask_t numa_cpumask_lookup_table[MAX_NUMNODES]; | 40 | cpumask_t numa_cpumask_lookup_table[MAX_NUMNODES]; |
41 | int nr_cpus_in_node[MAX_NUMNODES] = { [0 ... (MAX_NUMNODES -1)] = 0}; | ||
42 | 41 | ||
43 | struct pglist_data *node_data[MAX_NUMNODES]; | 42 | struct pglist_data *node_data[MAX_NUMNODES]; |
44 | bootmem_data_t __initdata plat_node_bdata[MAX_NUMNODES]; | 43 | bootmem_data_t __initdata plat_node_bdata[MAX_NUMNODES]; |
@@ -58,14 +57,12 @@ EXPORT_SYMBOL(node_data); | |||
58 | EXPORT_SYMBOL(numa_cpu_lookup_table); | 57 | EXPORT_SYMBOL(numa_cpu_lookup_table); |
59 | EXPORT_SYMBOL(numa_memory_lookup_table); | 58 | EXPORT_SYMBOL(numa_memory_lookup_table); |
60 | EXPORT_SYMBOL(numa_cpumask_lookup_table); | 59 | EXPORT_SYMBOL(numa_cpumask_lookup_table); |
61 | EXPORT_SYMBOL(nr_cpus_in_node); | ||
62 | 60 | ||
63 | static inline void map_cpu_to_node(int cpu, int node) | 61 | static inline void map_cpu_to_node(int cpu, int node) |
64 | { | 62 | { |
65 | numa_cpu_lookup_table[cpu] = node; | 63 | numa_cpu_lookup_table[cpu] = node; |
66 | if (!(cpu_isset(cpu, numa_cpumask_lookup_table[node]))) { | 64 | if (!(cpu_isset(cpu, numa_cpumask_lookup_table[node]))) { |
67 | cpu_set(cpu, numa_cpumask_lookup_table[node]); | 65 | cpu_set(cpu, numa_cpumask_lookup_table[node]); |
68 | nr_cpus_in_node[node]++; | ||
69 | } | 66 | } |
70 | } | 67 | } |
71 | 68 | ||
@@ -78,7 +75,6 @@ static void unmap_cpu_from_node(unsigned long cpu) | |||
78 | 75 | ||
79 | if (cpu_isset(cpu, numa_cpumask_lookup_table[node])) { | 76 | if (cpu_isset(cpu, numa_cpumask_lookup_table[node])) { |
80 | cpu_clear(cpu, numa_cpumask_lookup_table[node]); | 77 | cpu_clear(cpu, numa_cpumask_lookup_table[node]); |
81 | nr_cpus_in_node[node]--; | ||
82 | } else { | 78 | } else { |
83 | printk(KERN_ERR "WARNING: cpu %lu not found in node %d\n", | 79 | printk(KERN_ERR "WARNING: cpu %lu not found in node %d\n", |
84 | cpu, node); | 80 | cpu, node); |
diff --git a/include/asm-powerpc/topology.h b/include/asm-powerpc/topology.h index 2512e3836bf4..388cc9f1277f 100644 --- a/include/asm-powerpc/topology.h +++ b/include/asm-powerpc/topology.h | |||
@@ -37,8 +37,6 @@ static inline int node_to_first_cpu(int node) | |||
37 | #define pcibus_to_node(node) (-1) | 37 | #define pcibus_to_node(node) (-1) |
38 | #define pcibus_to_cpumask(bus) (cpu_online_map) | 38 | #define pcibus_to_cpumask(bus) (cpu_online_map) |
39 | 39 | ||
40 | #define nr_cpus_node(node) (nr_cpus_in_node[node]) | ||
41 | |||
42 | /* sched_domains SD_NODE_INIT for PPC64 machines */ | 40 | /* sched_domains SD_NODE_INIT for PPC64 machines */ |
43 | #define SD_NODE_INIT (struct sched_domain) { \ | 41 | #define SD_NODE_INIT (struct sched_domain) { \ |
44 | .span = CPU_MASK_NONE, \ | 42 | .span = CPU_MASK_NONE, \ |
diff --git a/include/asm-ppc64/mmzone.h b/include/asm-ppc64/mmzone.h index f6e95da96427..7f06afbfbabb 100644 --- a/include/asm-ppc64/mmzone.h +++ b/include/asm-ppc64/mmzone.h | |||
@@ -32,7 +32,6 @@ extern struct pglist_data *node_data[]; | |||
32 | extern int numa_cpu_lookup_table[]; | 32 | extern int numa_cpu_lookup_table[]; |
33 | extern char *numa_memory_lookup_table; | 33 | extern char *numa_memory_lookup_table; |
34 | extern cpumask_t numa_cpumask_lookup_table[]; | 34 | extern cpumask_t numa_cpumask_lookup_table[]; |
35 | extern int nr_cpus_in_node[]; | ||
36 | #ifdef CONFIG_MEMORY_HOTPLUG | 35 | #ifdef CONFIG_MEMORY_HOTPLUG |
37 | extern unsigned long max_pfn; | 36 | extern unsigned long max_pfn; |
38 | #endif | 37 | #endif |