aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2015-02-13 17:37:17 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-14 00:21:37 -0500
commit62518994dd4c7c9a0a634441f012281406887258 (patch)
tree6ea6bbabebf5350551f53befb400321a00fb3a62 /arch/xtensa
parent90b586c026fee779b0d675c69f8de9111065f7a1 (diff)
xtensa: use %*pb[l] to print bitmaps including cpumasks and nodemasks
printk and friends can now format bitmaps using '%*pb[l]'. cpumask and nodemask also provide cpumask_pr_args() and nodemask_pr_args() respectively which can be used to generate the two printf arguments necessary to format the specified cpu/nodemask. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Chris Zankel <chris@zankel.net> Cc: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/xtensa')
-rw-r--r--arch/xtensa/kernel/setup.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index 06370ccea9e9..28fc57ef5b86 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -574,12 +574,9 @@ void machine_power_off(void)
574static int 574static int
575c_show(struct seq_file *f, void *slot) 575c_show(struct seq_file *f, void *slot)
576{ 576{
577 char buf[NR_CPUS * 5];
578
579 cpulist_scnprintf(buf, sizeof(buf), cpu_online_mask);
580 /* high-level stuff */ 577 /* high-level stuff */
581 seq_printf(f, "CPU count\t: %u\n" 578 seq_printf(f, "CPU count\t: %u\n"
582 "CPU list\t: %s\n" 579 "CPU list\t: %*pbl\n"
583 "vendor_id\t: Tensilica\n" 580 "vendor_id\t: Tensilica\n"
584 "model\t\t: Xtensa " XCHAL_HW_VERSION_NAME "\n" 581 "model\t\t: Xtensa " XCHAL_HW_VERSION_NAME "\n"
585 "core ID\t\t: " XCHAL_CORE_ID "\n" 582 "core ID\t\t: " XCHAL_CORE_ID "\n"
@@ -588,7 +585,7 @@ c_show(struct seq_file *f, void *slot)
588 "cpu MHz\t\t: %lu.%02lu\n" 585 "cpu MHz\t\t: %lu.%02lu\n"
589 "bogomips\t: %lu.%02lu\n", 586 "bogomips\t: %lu.%02lu\n",
590 num_online_cpus(), 587 num_online_cpus(),
591 buf, 588 cpumask_pr_args(cpu_online_mask),
592 XCHAL_BUILD_UNIQUE_ID, 589 XCHAL_BUILD_UNIQUE_ID,
593 XCHAL_HAVE_BE ? "big" : "little", 590 XCHAL_HAVE_BE ? "big" : "little",
594 ccount_freq/1000000, 591 ccount_freq/1000000,