diff options
author | Jayachandran C <jchandra@broadcom.com> | 2013-03-23 13:27:55 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-05-07 19:19:04 -0400 |
commit | 62b734d289989dd15ab7a52227879ce95db9a934 (patch) | |
tree | 069d792869de0184658acb4f5f12bf8bd9f0b137 /arch/mips/netlogic | |
parent | e6904ff6c6992e55e068678b1b6c95376fe328fd (diff) |
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>
Diffstat (limited to 'arch/mips/netlogic')
-rw-r--r-- | arch/mips/netlogic/common/smp.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/arch/mips/netlogic/common/smp.c b/arch/mips/netlogic/common/smp.c index 2bb95dcfe20a..ffba52489bef 100644 --- a/arch/mips/netlogic/common/smp.c +++ b/arch/mips/netlogic/common/smp.c | |||
@@ -148,8 +148,7 @@ void nlm_cpus_done(void) | |||
148 | int nlm_cpu_ready[NR_CPUS]; | 148 | int nlm_cpu_ready[NR_CPUS]; |
149 | unsigned long nlm_next_gp; | 149 | unsigned long nlm_next_gp; |
150 | unsigned long nlm_next_sp; | 150 | unsigned long nlm_next_sp; |
151 | 151 | static cpumask_t phys_cpu_present_mask; | |
152 | cpumask_t phys_cpu_present_map; | ||
153 | 152 | ||
154 | void nlm_boot_secondary(int logical_cpu, struct task_struct *idle) | 153 | void nlm_boot_secondary(int logical_cpu, struct task_struct *idle) |
155 | { | 154 | { |
@@ -169,11 +168,12 @@ void __init nlm_smp_setup(void) | |||
169 | { | 168 | { |
170 | unsigned int boot_cpu; | 169 | unsigned int boot_cpu; |
171 | int num_cpus, i, ncore; | 170 | int num_cpus, i, ncore; |
171 | char buf[64]; | ||
172 | 172 | ||
173 | boot_cpu = hard_smp_processor_id(); | 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 | __cpu_number_map[boot_cpu] = 0; | 177 | __cpu_number_map[boot_cpu] = 0; |
178 | __cpu_logical_map[0] = boot_cpu; | 178 | __cpu_logical_map[0] = boot_cpu; |
179 | set_cpu_possible(0, true); | 179 | set_cpu_possible(0, true); |
@@ -185,7 +185,7 @@ void __init nlm_smp_setup(void) | |||
185 | * it is only set for ASPs (see smpboot.S) | 185 | * it is only set for ASPs (see smpboot.S) |
186 | */ | 186 | */ |
187 | if (nlm_cpu_ready[i]) { | 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 | __cpu_number_map[i] = num_cpus; | 189 | __cpu_number_map[i] = num_cpus; |
190 | __cpu_logical_map[num_cpus] = i; | 190 | __cpu_logical_map[num_cpus] = i; |
191 | set_cpu_possible(num_cpus, true); | 191 | set_cpu_possible(num_cpus, true); |
@@ -193,16 +193,19 @@ void __init nlm_smp_setup(void) | |||
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 | /* check with the cores we have worken up */ | 201 | /* check with the cores we have worken up */ |
197 | for (ncore = 0, i = 0; i < NLM_NR_NODES; i++) | 202 | for (ncore = 0, i = 0; i < NLM_NR_NODES; i++) |
198 | ncore += hweight32(nlm_get_node(i)->coremask); | 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 | pr_info("Detected (%dc%dt) %d Slave CPU(s)\n", ncore, | 205 | pr_info("Detected (%dc%dt) %d Slave CPU(s)\n", ncore, |
205 | nlm_threads_per_core, num_cpus); | 206 | nlm_threads_per_core, num_cpus); |
207 | |||
208 | /* switch NMI handler to boot CPUs */ | ||
206 | nlm_set_nmi_handler(nlm_boot_secondary_cpus); | 209 | nlm_set_nmi_handler(nlm_boot_secondary_cpus); |
207 | } | 210 | } |
208 | 211 | ||