aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/intel_cacheinfo.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-03-05 14:52:18 -0500
committerIngo Molnar <mingo@kernel.org>2015-03-05 14:52:18 -0500
commit33ca8a53f262b4af40611bea331b8c87d133af72 (patch)
treed6468c820a556c4915bcb5b761204a0fb19e8225 /arch/x86/kernel/cpu/intel_cacheinfo.c
parentdb2dcb4f91d5fec5c346a82c309187ee821e2495 (diff)
parent13a7a6ac0a11197edcd0f756a035f472b42cdf8b (diff)
Merge tag 'v4.0-rc2' into irq/core, to refresh the tree before applying new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/cpu/intel_cacheinfo.c')
-rw-r--r--arch/x86/kernel/cpu/intel_cacheinfo.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index c7035073dfc1..659643376dbf 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -952,20 +952,18 @@ static ssize_t show_size(struct _cpuid4_info *this_leaf, char *buf,
952static ssize_t show_shared_cpu_map_func(struct _cpuid4_info *this_leaf, 952static ssize_t show_shared_cpu_map_func(struct _cpuid4_info *this_leaf,
953 int type, char *buf) 953 int type, char *buf)
954{ 954{
955 ptrdiff_t len = PTR_ALIGN(buf + PAGE_SIZE - 1, PAGE_SIZE) - buf; 955 const struct cpumask *mask = to_cpumask(this_leaf->shared_cpu_map);
956 int n = 0; 956 int ret;
957 957
958 if (len > 1) { 958 if (type)
959 const struct cpumask *mask; 959 ret = scnprintf(buf, PAGE_SIZE - 1, "%*pbl",
960 960 cpumask_pr_args(mask));
961 mask = to_cpumask(this_leaf->shared_cpu_map); 961 else
962 n = type ? 962 ret = scnprintf(buf, PAGE_SIZE - 1, "%*pb",
963 cpulist_scnprintf(buf, len-2, mask) : 963 cpumask_pr_args(mask));
964 cpumask_scnprintf(buf, len-2, mask); 964 buf[ret++] = '\n';
965 buf[n++] = '\n'; 965 buf[ret] = '\0';
966 buf[n] = '\0'; 966 return ret;
967 }
968 return n;
969} 967}
970 968
971static inline ssize_t show_shared_cpu_map(struct _cpuid4_info *leaf, char *buf, 969static inline ssize_t show_shared_cpu_map(struct _cpuid4_info *leaf, char *buf,