tile: 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 Metcalf <cmetcalf@tilera.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
0c118b7bd0
commit
839b268033
@@ -353,15 +353,13 @@ static int __init setup_ktext(char *str)
|
||||
|
||||
/* Neighborhood ktext pages on specified mask */
|
||||
else if (cpulist_parse(str, &ktext_mask) == 0) {
|
||||
char buf[NR_CPUS * 5];
|
||||
cpulist_scnprintf(buf, sizeof(buf), &ktext_mask);
|
||||
if (cpumask_weight(&ktext_mask) > 1) {
|
||||
ktext_small = 1;
|
||||
pr_info("ktext: using caching neighborhood %s with small pages\n",
|
||||
buf);
|
||||
pr_info("ktext: using caching neighborhood %*pbl with small pages\n",
|
||||
cpumask_pr_args(&ktext_mask));
|
||||
} else {
|
||||
pr_info("ktext: caching on cpu %s with one huge page\n",
|
||||
buf);
|
||||
pr_info("ktext: caching on cpu %*pbl with one huge page\n",
|
||||
cpumask_pr_args(&ktext_mask));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -492,11 +490,9 @@ static void __init kernel_physical_mapping_init(pgd_t *pgd_base)
|
||||
struct cpumask bad;
|
||||
cpumask_andnot(&bad, &ktext_mask, cpu_possible_mask);
|
||||
cpumask_and(&ktext_mask, &ktext_mask, cpu_possible_mask);
|
||||
if (!cpumask_empty(&bad)) {
|
||||
char buf[NR_CPUS * 5];
|
||||
cpulist_scnprintf(buf, sizeof(buf), &bad);
|
||||
pr_info("ktext: not using unavailable cpus %s\n", buf);
|
||||
}
|
||||
if (!cpumask_empty(&bad))
|
||||
pr_info("ktext: not using unavailable cpus %*pbl\n",
|
||||
cpumask_pr_args(&bad));
|
||||
if (cpumask_empty(&ktext_mask)) {
|
||||
pr_warn("ktext: no valid cpus; caching on %d\n",
|
||||
smp_processor_id());
|
||||
|
Reference in New Issue
Block a user