diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-13 00:19:52 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-13 00:19:52 -0400 |
commit | b9c4398ed43a7ed023e091610c23ba7412aec2a8 (patch) | |
tree | 4fe0afb8f9b9f0970870307bf7016170556ba4f5 | |
parent | b643decad6c80b6886a01a8c2229be6b7951ff7b (diff) |
cpumask: remove x86's node_to_cpumask now everyone uses cpumask_of_node
Impact: cleanup
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r-- | arch/x86/include/asm/topology.h | 41 | ||||
-rw-r--r-- | arch/x86/mm/numa_64.c | 26 |
2 files changed, 0 insertions, 67 deletions
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h index fa4aa42e976d..216a960d4f10 100644 --- a/arch/x86/include/asm/topology.h +++ b/arch/x86/include/asm/topology.h | |||
@@ -57,17 +57,6 @@ static inline int cpu_to_node(int cpu) | |||
57 | } | 57 | } |
58 | #define early_cpu_to_node(cpu) cpu_to_node(cpu) | 58 | #define early_cpu_to_node(cpu) cpu_to_node(cpu) |
59 | 59 | ||
60 | /* Returns a bitmask of CPUs on Node 'node'. | ||
61 | * | ||
62 | * Side note: this function creates the returned cpumask on the stack | ||
63 | * so with a high NR_CPUS count, excessive stack space is used. The | ||
64 | * cpumask_of_node function should be used whenever possible. | ||
65 | */ | ||
66 | static inline cpumask_t node_to_cpumask(int node) | ||
67 | { | ||
68 | return node_to_cpumask_map[node]; | ||
69 | } | ||
70 | |||
71 | /* Returns a bitmask of CPUs on Node 'node'. */ | 60 | /* Returns a bitmask of CPUs on Node 'node'. */ |
72 | static inline const struct cpumask *cpumask_of_node(int node) | 61 | static inline const struct cpumask *cpumask_of_node(int node) |
73 | { | 62 | { |
@@ -92,7 +81,6 @@ DECLARE_PER_CPU(int, node_number); | |||
92 | extern int cpu_to_node(int cpu); | 81 | extern int cpu_to_node(int cpu); |
93 | extern int early_cpu_to_node(int cpu); | 82 | extern int early_cpu_to_node(int cpu); |
94 | extern const cpumask_t *cpumask_of_node(int node); | 83 | extern const cpumask_t *cpumask_of_node(int node); |
95 | extern cpumask_t node_to_cpumask(int node); | ||
96 | 84 | ||
97 | #else /* !CONFIG_DEBUG_PER_CPU_MAPS */ | 85 | #else /* !CONFIG_DEBUG_PER_CPU_MAPS */ |
98 | 86 | ||
@@ -114,26 +102,10 @@ static inline const cpumask_t *cpumask_of_node(int node) | |||
114 | return &node_to_cpumask_map[node]; | 102 | return &node_to_cpumask_map[node]; |
115 | } | 103 | } |
116 | 104 | ||
117 | /* Returns a bitmask of CPUs on Node 'node'. */ | ||
118 | static inline cpumask_t node_to_cpumask(int node) | ||
119 | { | ||
120 | return node_to_cpumask_map[node]; | ||
121 | } | ||
122 | |||
123 | #endif /* !CONFIG_DEBUG_PER_CPU_MAPS */ | 105 | #endif /* !CONFIG_DEBUG_PER_CPU_MAPS */ |
124 | 106 | ||
125 | extern void setup_node_to_cpumask_map(void); | 107 | extern void setup_node_to_cpumask_map(void); |
126 | 108 | ||
127 | /* | ||
128 | * Replace default node_to_cpumask_ptr with optimized version | ||
129 | * Deprecated: use "const struct cpumask *mask = cpumask_of_node(node)" | ||
130 | */ | ||
131 | #define node_to_cpumask_ptr(v, node) \ | ||
132 | const cpumask_t *v = cpumask_of_node(node) | ||
133 | |||
134 | #define node_to_cpumask_ptr_next(v, node) \ | ||
135 | v = cpumask_of_node(node) | ||
136 | |||
137 | #endif /* CONFIG_X86_64 */ | 109 | #endif /* CONFIG_X86_64 */ |
138 | 110 | ||
139 | /* | 111 | /* |
@@ -212,10 +184,6 @@ static inline const cpumask_t *cpumask_of_node(int node) | |||
212 | { | 184 | { |
213 | return &cpu_online_map; | 185 | return &cpu_online_map; |
214 | } | 186 | } |
215 | static inline cpumask_t node_to_cpumask(int node) | ||
216 | { | ||
217 | return cpu_online_map; | ||
218 | } | ||
219 | static inline int node_to_first_cpu(int node) | 187 | static inline int node_to_first_cpu(int node) |
220 | { | 188 | { |
221 | return first_cpu(cpu_online_map); | 189 | return first_cpu(cpu_online_map); |
@@ -223,15 +191,6 @@ static inline int node_to_first_cpu(int node) | |||
223 | 191 | ||
224 | static inline void setup_node_to_cpumask_map(void) { } | 192 | static inline void setup_node_to_cpumask_map(void) { } |
225 | 193 | ||
226 | /* | ||
227 | * Replace default node_to_cpumask_ptr with optimized version | ||
228 | * Deprecated: use "const struct cpumask *mask = cpumask_of_node(node)" | ||
229 | */ | ||
230 | #define node_to_cpumask_ptr(v, node) \ | ||
231 | const cpumask_t *v = cpumask_of_node(node) | ||
232 | |||
233 | #define node_to_cpumask_ptr_next(v, node) \ | ||
234 | v = cpumask_of_node(node) | ||
235 | #endif | 194 | #endif |
236 | 195 | ||
237 | #include <asm-generic/topology.h> | 196 | #include <asm-generic/topology.h> |
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index 64c9cf043cdd..48bf396b6e79 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c | |||
@@ -827,32 +827,6 @@ const cpumask_t *cpumask_of_node(int node) | |||
827 | EXPORT_SYMBOL(cpumask_of_node); | 827 | EXPORT_SYMBOL(cpumask_of_node); |
828 | 828 | ||
829 | /* | 829 | /* |
830 | * Returns a bitmask of CPUs on Node 'node'. | ||
831 | * | ||
832 | * Side note: this function creates the returned cpumask on the stack | ||
833 | * so with a high NR_CPUS count, excessive stack space is used. The | ||
834 | * node_to_cpumask_ptr function should be used whenever possible. | ||
835 | */ | ||
836 | cpumask_t node_to_cpumask(int node) | ||
837 | { | ||
838 | if (node_to_cpumask_map == NULL) { | ||
839 | printk(KERN_WARNING | ||
840 | "node_to_cpumask(%d): no node_to_cpumask_map!\n", node); | ||
841 | dump_stack(); | ||
842 | return cpu_online_map; | ||
843 | } | ||
844 | if (node >= nr_node_ids) { | ||
845 | printk(KERN_WARNING | ||
846 | "node_to_cpumask(%d): node > nr_node_ids(%d)\n", | ||
847 | node, nr_node_ids); | ||
848 | dump_stack(); | ||
849 | return cpu_mask_none; | ||
850 | } | ||
851 | return node_to_cpumask_map[node]; | ||
852 | } | ||
853 | EXPORT_SYMBOL(node_to_cpumask); | ||
854 | |||
855 | /* | ||
856 | * --------- end of debug versions of the numa functions --------- | 830 | * --------- end of debug versions of the numa functions --------- |
857 | */ | 831 | */ |
858 | 832 | ||