Commit 62b734d289989dd15ab7a52227879ce95db9a934
Committed by
Ralf Baechle
1 parent
e6904ff6c6
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
MIPS: Netlogic: print cpumask with cpumask_scnprintf
Use standard function to print cpumask. Also fixup the name of the variable used and make it static. Signed-off-by: Jayachandran C <jchandra@broadcom.com> Patchwork: http://patchwork.linux-mips.org/patch/5024/ Acked-by: John Crispin <blogic@openwrt.org>
Showing 1 changed file with 12 additions and 9 deletions Side-by-side Diff
arch/mips/netlogic/common/smp.c
... | ... | @@ -148,9 +148,8 @@ |
148 | 148 | int nlm_cpu_ready[NR_CPUS]; |
149 | 149 | unsigned long nlm_next_gp; |
150 | 150 | unsigned long nlm_next_sp; |
151 | +static cpumask_t phys_cpu_present_mask; | |
151 | 152 | |
152 | -cpumask_t phys_cpu_present_map; | |
153 | - | |
154 | 153 | void nlm_boot_secondary(int logical_cpu, struct task_struct *idle) |
155 | 154 | { |
156 | 155 | int cpu, node; |
157 | 156 | |
158 | 157 | |
... | ... | @@ -169,11 +168,12 @@ |
169 | 168 | { |
170 | 169 | unsigned int boot_cpu; |
171 | 170 | int num_cpus, i, ncore; |
171 | + char buf[64]; | |
172 | 172 | |
173 | 173 | boot_cpu = hard_smp_processor_id(); |
174 | - cpumask_clear(&phys_cpu_present_map); | |
174 | + cpumask_clear(&phys_cpu_present_mask); | |
175 | 175 | |
176 | - cpumask_set_cpu(boot_cpu, &phys_cpu_present_map); | |
176 | + cpumask_set_cpu(boot_cpu, &phys_cpu_present_mask); | |
177 | 177 | __cpu_number_map[boot_cpu] = 0; |
178 | 178 | __cpu_logical_map[0] = boot_cpu; |
179 | 179 | set_cpu_possible(0, true); |
... | ... | @@ -185,7 +185,7 @@ |
185 | 185 | * it is only set for ASPs (see smpboot.S) |
186 | 186 | */ |
187 | 187 | if (nlm_cpu_ready[i]) { |
188 | - cpumask_set_cpu(i, &phys_cpu_present_map); | |
188 | + cpumask_set_cpu(i, &phys_cpu_present_mask); | |
189 | 189 | __cpu_number_map[i] = num_cpus; |
190 | 190 | __cpu_logical_map[num_cpus] = i; |
191 | 191 | set_cpu_possible(num_cpus, true); |
192 | 192 | |
193 | 193 | |
... | ... | @@ -193,16 +193,19 @@ |
193 | 193 | } |
194 | 194 | } |
195 | 195 | |
196 | + cpumask_scnprintf(buf, ARRAY_SIZE(buf), &phys_cpu_present_mask); | |
197 | + pr_info("Physical CPU mask: %s\n", buf); | |
198 | + cpumask_scnprintf(buf, ARRAY_SIZE(buf), cpu_possible_mask); | |
199 | + pr_info("Possible CPU mask: %s\n", buf); | |
200 | + | |
196 | 201 | /* check with the cores we have worken up */ |
197 | 202 | for (ncore = 0, i = 0; i < NLM_NR_NODES; i++) |
198 | 203 | ncore += hweight32(nlm_get_node(i)->coremask); |
199 | 204 | |
200 | - pr_info("Phys CPU present map: %lx, possible map %lx\n", | |
201 | - (unsigned long)cpumask_bits(&phys_cpu_present_map)[0], | |
202 | - (unsigned long)cpumask_bits(cpu_possible_mask)[0]); | |
203 | - | |
204 | 205 | pr_info("Detected (%dc%dt) %d Slave CPU(s)\n", ncore, |
205 | 206 | nlm_threads_per_core, num_cpus); |
207 | + | |
208 | + /* switch NMI handler to boot CPUs */ | |
206 | 209 | nlm_set_nmi_handler(nlm_boot_secondary_cpus); |
207 | 210 | } |
208 | 211 |