Commit 0963a84b authored by Venkatesh Pallipadi's avatar Venkatesh Pallipadi Committed by Linus Torvalds

[PATCH] x86[64]: display phys_proc_id only when it is initialized

phys_proc_id gets initialized only when (smp_num_siblings > 1).  But gets
printed even when (smp_num_siblings == 1).  As a result we print incorrect
physical processor id in /proc/cpuinfo, when HT is disabled.
Signed-off-by: default avatar: "Venkatesh Pallipadi" <venkatesh.pallipadi@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent bde66a50
......@@ -88,7 +88,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
if (c->x86_cache_size >= 0)
seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size);
#ifdef CONFIG_X86_HT
if (cpu_has_ht) {
if (smp_num_siblings > 1) {
extern int phys_proc_id[NR_CPUS];
seq_printf(m, "physical id\t: %d\n", phys_proc_id[n]);
seq_printf(m, "siblings\t: %d\n", smp_num_siblings);
......
......@@ -1010,7 +1010,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size);
#ifdef CONFIG_X86_HT
if (cpu_has_ht) {
if (smp_num_siblings > 1) {
seq_printf(m, "physical id\t: %d\n", phys_proc_id[c - cpu_data]);
seq_printf(m, "siblings\t: %d\n", smp_num_siblings);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment