aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/kernel/cpu/proc.c7
-rw-r--r--arch/x86_64/kernel/setup.c8
2 files changed, 11 insertions, 4 deletions
diff --git a/arch/i386/kernel/cpu/proc.c b/arch/i386/kernel/cpu/proc.c
index c8d83fdc237a..89a2956ee657 100644
--- a/arch/i386/kernel/cpu/proc.c
+++ b/arch/i386/kernel/cpu/proc.c
@@ -94,8 +94,11 @@ static int show_cpuinfo(struct seq_file *m, void *v)
94 if (c->x86_cache_size >= 0) 94 if (c->x86_cache_size >= 0)
95 seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size); 95 seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size);
96#ifdef CONFIG_X86_HT 96#ifdef CONFIG_X86_HT
97 seq_printf(m, "physical id\t: %d\n", phys_proc_id[n]); 97 if (c->x86_num_cores * smp_num_siblings > 1) {
98 seq_printf(m, "siblings\t: %d\n", c->x86_num_cores * smp_num_siblings); 98 seq_printf(m, "physical id\t: %d\n", phys_proc_id[n]);
99 seq_printf(m, "siblings\t: %d\n",
100 c->x86_num_cores * smp_num_siblings);
101 }
99#endif 102#endif
100 103
101 /* We use exception 16 if we have hardware math and we've either seen it or the CPU claims it is internal */ 104 /* We use exception 16 if we have hardware math and we've either seen it or the CPU claims it is internal */
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
index e50fc41de6b9..a191d4831789 100644
--- a/arch/x86_64/kernel/setup.c
+++ b/arch/x86_64/kernel/setup.c
@@ -1113,8 +1113,12 @@ static int show_cpuinfo(struct seq_file *m, void *v)
1113 seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size); 1113 seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size);
1114 1114
1115#ifdef CONFIG_SMP 1115#ifdef CONFIG_SMP
1116 seq_printf(m, "physical id\t: %d\n", phys_proc_id[c - cpu_data]); 1116 if (smp_num_siblings * c->x86_num_cores > 1) {
1117 seq_printf(m, "siblings\t: %d\n", c->x86_num_cores * smp_num_siblings); 1117 int cpu = c - cpu_data;
1118 seq_printf(m, "physical id\t: %d\n", phys_proc_id[cpu]);
1119 seq_printf(m, "siblings\t: %d\n",
1120 c->x86_num_cores * smp_num_siblings);
1121 }
1118#endif 1122#endif
1119 1123
1120 seq_printf(m, 1124 seq_printf(m,