Skip to content

Commit ad853b4

Browse files
htejuntorvalds
authored andcommitted
rcu: 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: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent e8e6d97 commit ad853b4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

kernel/rcu/tree_plugin.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ DEFINE_PER_CPU(char, rcu_cpu_has_work);
4949
static cpumask_var_t rcu_nocb_mask; /* CPUs to have callbacks offloaded. */
5050
static bool have_rcu_nocb_mask; /* Was rcu_nocb_mask allocated? */
5151
static bool __read_mostly rcu_nocb_poll; /* Offload kthread are to poll. */
52-
static char __initdata nocb_buf[NR_CPUS * 5];
5352
#endif /* #ifdef CONFIG_RCU_NOCB_CPU */
5453

5554
/*
@@ -2386,8 +2385,8 @@ void __init rcu_init_nohz(void)
23862385
cpumask_and(rcu_nocb_mask, cpu_possible_mask,
23872386
rcu_nocb_mask);
23882387
}
2389-
cpulist_scnprintf(nocb_buf, sizeof(nocb_buf), rcu_nocb_mask);
2390-
pr_info("\tOffload RCU callbacks from CPUs: %s.\n", nocb_buf);
2388+
pr_info("\tOffload RCU callbacks from CPUs: %*pbl.\n",
2389+
cpumask_pr_args(rcu_nocb_mask));
23912390
if (rcu_nocb_poll)
23922391
pr_info("\tPoll for callbacks from no-CBs CPUs.\n");
23932392

0 commit comments

Comments
 (0)