提交 2e240ddd 编写于 作者: J Jayachandran C 提交者: Ralf Baechle

MIPS: Netlogic: Use cpumask_scnprintf for wakeup_mask

Use standard function to print cpumask. Also fixup a typo in the same
file.
Signed-off-by: NJayachandran C <jchandra@broadcom.com>
Cc: g@linux-mips.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6909/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 9de10ffb
...@@ -194,7 +194,7 @@ void __init nlm_smp_setup(void) ...@@ -194,7 +194,7 @@ void __init nlm_smp_setup(void)
cpumask_scnprintf(buf, ARRAY_SIZE(buf), cpu_possible_mask); cpumask_scnprintf(buf, ARRAY_SIZE(buf), cpu_possible_mask);
pr_info("Possible CPU mask: %s\n", buf); pr_info("Possible CPU mask: %s\n", buf);
/* check with the cores we have worken up */ /* check with the cores we have woken up */
for (ncore = 0, i = 0; i < NLM_NR_NODES; i++) for (ncore = 0, i = 0; i < NLM_NR_NODES; i++)
ncore += hweight32(nlm_get_node(i)->coremask); ncore += hweight32(nlm_get_node(i)->coremask);
...@@ -209,6 +209,7 @@ static int nlm_parse_cpumask(cpumask_t *wakeup_mask) ...@@ -209,6 +209,7 @@ static int nlm_parse_cpumask(cpumask_t *wakeup_mask)
{ {
uint32_t core0_thr_mask, core_thr_mask; uint32_t core0_thr_mask, core_thr_mask;
int threadmode, i, j; int threadmode, i, j;
char buf[64];
core0_thr_mask = 0; core0_thr_mask = 0;
for (i = 0; i < NLM_THREADS_PER_CORE; i++) for (i = 0; i < NLM_THREADS_PER_CORE; i++)
...@@ -243,8 +244,8 @@ static int nlm_parse_cpumask(cpumask_t *wakeup_mask) ...@@ -243,8 +244,8 @@ static int nlm_parse_cpumask(cpumask_t *wakeup_mask)
return threadmode; return threadmode;
unsupp: unsupp:
panic("Unsupported CPU mask %lx", cpumask_scnprintf(buf, ARRAY_SIZE(buf), wakeup_mask);
(unsigned long)cpumask_bits(wakeup_mask)[0]); panic("Unsupported CPU mask %s", buf);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册