diff options
author | Tejun Heo <tj@kernel.org> | 2015-02-13 17:37:31 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-14 00:21:37 -0500 |
commit | ffda22c1f316ff9c12f5911ac7a18ec3a49c9d02 (patch) | |
tree | 498ad46deeb0c82e0bb9f1839b68ea6eaffc89c6 /kernel | |
parent | 333470ee46b6851477dc9392eb71ba8ffa4f3387 (diff) |
time: 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: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/time/tick-sched.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 1363d58f07e9..a4c4edac4528 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c | |||
@@ -326,13 +326,6 @@ static int tick_nohz_cpu_down_callback(struct notifier_block *nfb, | |||
326 | return NOTIFY_OK; | 326 | return NOTIFY_OK; |
327 | } | 327 | } |
328 | 328 | ||
329 | /* | ||
330 | * Worst case string length in chunks of CPU range seems 2 steps | ||
331 | * separations: 0,2,4,6,... | ||
332 | * This is NR_CPUS + sizeof('\0') | ||
333 | */ | ||
334 | static char __initdata nohz_full_buf[NR_CPUS + 1]; | ||
335 | |||
336 | static int tick_nohz_init_all(void) | 329 | static int tick_nohz_init_all(void) |
337 | { | 330 | { |
338 | int err = -1; | 331 | int err = -1; |
@@ -393,8 +386,8 @@ void __init tick_nohz_init(void) | |||
393 | context_tracking_cpu_set(cpu); | 386 | context_tracking_cpu_set(cpu); |
394 | 387 | ||
395 | cpu_notifier(tick_nohz_cpu_down_callback, 0); | 388 | cpu_notifier(tick_nohz_cpu_down_callback, 0); |
396 | cpulist_scnprintf(nohz_full_buf, sizeof(nohz_full_buf), tick_nohz_full_mask); | 389 | pr_info("NO_HZ: Full dynticks CPUs: %*pbl.\n", |
397 | pr_info("NO_HZ: Full dynticks CPUs: %s.\n", nohz_full_buf); | 390 | cpumask_pr_args(tick_nohz_full_mask)); |
398 | } | 391 | } |
399 | #endif | 392 | #endif |
400 | 393 | ||