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:
@@ -115,7 +115,6 @@ void flush_remote(unsigned long cache_pfn, unsigned long cache_control,
|
||||
struct cpumask cache_cpumask_copy, tlb_cpumask_copy;
|
||||
struct cpumask *cache_cpumask, *tlb_cpumask;
|
||||
HV_PhysAddr cache_pa;
|
||||
char cache_buf[NR_CPUS*5], tlb_buf[NR_CPUS*5];
|
||||
|
||||
mb(); /* provided just to simplify "magic hypervisor" mode */
|
||||
|
||||
@@ -149,13 +148,12 @@ void flush_remote(unsigned long cache_pfn, unsigned long cache_control,
|
||||
asids, asidcount);
|
||||
if (rc == 0)
|
||||
return;
|
||||
cpumask_scnprintf(cache_buf, sizeof(cache_buf), &cache_cpumask_copy);
|
||||
cpumask_scnprintf(tlb_buf, sizeof(tlb_buf), &tlb_cpumask_copy);
|
||||
|
||||
pr_err("hv_flush_remote(%#llx, %#lx, %p [%s], %#lx, %#lx, %#lx, %p [%s], %p, %d) = %d\n",
|
||||
cache_pa, cache_control, cache_cpumask, cache_buf,
|
||||
(unsigned long)tlb_va, tlb_length, tlb_pgsize,
|
||||
tlb_cpumask, tlb_buf, asids, asidcount, rc);
|
||||
pr_err("hv_flush_remote(%#llx, %#lx, %p [%*pb], %#lx, %#lx, %#lx, %p [%*pb], %p, %d) = %d\n",
|
||||
cache_pa, cache_control, cache_cpumask,
|
||||
cpumask_pr_args(&cache_cpumask_copy),
|
||||
(unsigned long)tlb_va, tlb_length, tlb_pgsize, tlb_cpumask,
|
||||
cpumask_pr_args(&tlb_cpumask_copy), asids, asidcount, rc);
|
||||
panic("Unsafe to continue.");
|
||||
}
|
||||
|
||||
|
@@ -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