* [PATCH] display phys_proc_id only when it is initialized
@ 2004-10-01 23:29 Venkatesh Pallipadi
0 siblings, 0 replies; only message in thread
From: Venkatesh Pallipadi @ 2004-10-01 23:29 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
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.
This patch fixes it.
Signed-off-by:: "Venkatesh Pallipadi" <venkatesh.pallipadi@intel.com>
--- linux-2.6.9-rc2/arch/i386/kernel/cpu/proc.c.org 2004-08-29 22:59:21.334053528 -0700
+++ linux-2.6.9-rc2/arch/i386/kernel/cpu/proc.c 2004-08-29 22:57:55.882044208 -0700
@@ -88,7 +88,7 @@ static int show_cpuinfo(struct seq_file
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);
--- linux-2.6.9-rc2/arch/x86_64/kernel/setup.c.org 2004-08-29 01:08:29.690920728 -0700
+++ linux-2.6.9-rc2/arch/x86_64/kernel/setup.c 2004-08-29 23:00:26.301177024 -0700
@@ -1132,7 +1132,7 @@ static int show_cpuinfo(struct seq_file
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);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-10-01 23:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-01 23:29 [PATCH] display phys_proc_id only when it is initialized Venkatesh Pallipadi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome