diff options
-rw-r--r-- | arch/x86/kernel/cpu/intel_cacheinfo.c | 26 | ||||
-rw-r--r-- | arch/x86/mm/numa.c | 6 | ||||
-rw-r--r-- | arch/x86/platform/uv/uv_nmi.c | 25 |
3 files changed, 21 insertions, 36 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, | |||
952 | static ssize_t show_shared_cpu_map_func(struct _cpuid4_info *this_leaf, | 952 | static 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 | ||
971 | static inline ssize_t show_shared_cpu_map(struct _cpuid4_info *leaf, char *buf, | 969 | static inline ssize_t show_shared_cpu_map(struct _cpuid4_info *leaf, char *buf, |
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 | ||
diff --git a/arch/x86/platform/uv/uv_nmi.c b/arch/x86/platform/uv/uv_nmi.c index c6b146e67116..7488cafab955 100644 --- a/arch/x86/platform/uv/uv_nmi.c +++ b/arch/x86/platform/uv/uv_nmi.c | |||
@@ -273,20 +273,6 @@ static inline void uv_clear_nmi(int cpu) | |||
273 | } | 273 | } |
274 | } | 274 | } |
275 | 275 | ||
276 | /* Print non-responding cpus */ | ||
277 | static void uv_nmi_nr_cpus_pr(char *fmt) | ||
278 | { | ||
279 | static char cpu_list[1024]; | ||
280 | int len = sizeof(cpu_list); | ||
281 | int c = cpumask_weight(uv_nmi_cpu_mask); | ||
282 | int n = cpulist_scnprintf(cpu_list, len, uv_nmi_cpu_mask); | ||
283 | |||
284 | if (n >= len-1) | ||
285 | strcpy(&cpu_list[len - 6], "...\n"); | ||
286 | |||
287 | printk(fmt, c, cpu_list); | ||
288 | } | ||
289 | |||
290 | /* Ping non-responding cpus attemping to force them into the NMI handler */ | 276 | /* Ping non-responding cpus attemping to force them into the NMI handler */ |
291 | static void uv_nmi_nr_cpus_ping(void) | 277 | static void uv_nmi_nr_cpus_ping(void) |
292 | { | 278 | { |
@@ -371,16 +357,19 @@ static void uv_nmi_wait(int master) | |||
371 | break; | 357 | break; |
372 | 358 | ||
373 | /* if not all made it in, send IPI NMI to them */ | 359 | /* if not all made it in, send IPI NMI to them */ |
374 | uv_nmi_nr_cpus_pr(KERN_ALERT | 360 | pr_alert("UV: Sending NMI IPI to %d non-responding CPUs: %*pbl\n", |
375 | "UV: Sending NMI IPI to %d non-responding CPUs: %s\n"); | 361 | cpumask_weight(uv_nmi_cpu_mask), |
362 | cpumask_pr_args(uv_nmi_cpu_mask)); | ||
363 | |||
376 | uv_nmi_nr_cpus_ping(); | 364 | uv_nmi_nr_cpus_ping(); |
377 | 365 | ||
378 | /* if all cpus are in, then done */ | 366 | /* if all cpus are in, then done */ |
379 | if (!uv_nmi_wait_cpus(0)) | 367 | if (!uv_nmi_wait_cpus(0)) |
380 | break; | 368 | break; |
381 | 369 | ||
382 | uv_nmi_nr_cpus_pr(KERN_ALERT | 370 | pr_alert("UV: %d CPUs not in NMI loop: %*pbl\n", |
383 | "UV: %d CPUs not in NMI loop: %s\n"); | 371 | cpumask_weight(uv_nmi_cpu_mask), |
372 | cpumask_pr_args(uv_nmi_cpu_mask)); | ||
384 | } while (0); | 373 | } while (0); |
385 | 374 | ||
386 | pr_alert("UV: %d of %d CPUs in NMI\n", | 375 | pr_alert("UV: %d of %d CPUs in NMI\n", |