diff options
author | Tejun Heo <tj@kernel.org> | 2015-02-13 17:37:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-14 00:21:37 -0500 |
commit | bf58b4879c33b3475a33740562ebf6583f531d4a (patch) | |
tree | 41f7bb24b58214aa07a38a3bf03d4781bf61348c /arch/x86/mm | |
parent | 839b268033c5d1316b2f8cf49184984e6f335fee (diff) |
x86: 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.
* Unnecessary buffer size calculation and condition on the lenght
removed from intel_cacheinfo.c::show_shared_cpu_map_func().
* uv_nmi_nr_cpus_pr() got overly smart and implemented "..."
abbreviation if the output stretched over the predefined 1024 byte
buffer. Replaced with plain printk.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Mike Travis <travis@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/numa.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index 1a883705a12a..cd4785bbacb9 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c | |||
@@ -794,7 +794,6 @@ int early_cpu_to_node(int cpu) | |||
794 | void debug_cpumask_set_cpu(int cpu, int node, bool enable) | 794 | void debug_cpumask_set_cpu(int cpu, int node, bool enable) |
795 | { | 795 | { |
796 | struct cpumask *mask; | 796 | struct cpumask *mask; |
797 | char buf[64]; | ||
798 | 797 | ||
799 | if (node == NUMA_NO_NODE) { | 798 | if (node == NUMA_NO_NODE) { |
800 | /* early_cpu_to_node() already emits a warning and trace */ | 799 | /* early_cpu_to_node() already emits a warning and trace */ |
@@ -812,10 +811,9 @@ void debug_cpumask_set_cpu(int cpu, int node, bool enable) | |||
812 | else | 811 | else |
813 | cpumask_clear_cpu(cpu, mask); | 812 | cpumask_clear_cpu(cpu, mask); |
814 | 813 | ||
815 | cpulist_scnprintf(buf, sizeof(buf), mask); | 814 | printk(KERN_DEBUG "%s cpu %d node %d: mask now %*pbl\n", |
816 | printk(KERN_DEBUG "%s cpu %d node %d: mask now %s\n", | ||
817 | enable ? "numa_add_cpu" : "numa_remove_cpu", | 815 | enable ? "numa_add_cpu" : "numa_remove_cpu", |
818 | cpu, node, buf); | 816 | cpu, node, cpumask_pr_args(mask)); |
819 | return; | 817 | return; |
820 | } | 818 | } |
821 | 819 | ||