
From: "Andi Kleen" <ak@suse.de>

Count both multi cores and SMP siblings in /proc/cpuinfo siblings.

This avoids breaking user space licensing managers who license by CPU on dual
core systems.

Port of the equivalent code on x86-64.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/i386/kernel/cpu/proc.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff -puN arch/i386/kernel/cpu/proc.c~i386-count-both-multi-cores-and-smp-siblings-in arch/i386/kernel/cpu/proc.c
--- 25/arch/i386/kernel/cpu/proc.c~i386-count-both-multi-cores-and-smp-siblings-in	2005-01-09 23:01:23.270845400 -0800
+++ 25-akpm/arch/i386/kernel/cpu/proc.c	2005-01-09 23:01:23.275844640 -0800
@@ -94,11 +94,8 @@ 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 (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);
-	}
+	seq_printf(m, "physical id\t: %d\n", phys_proc_id[n]);
+	seq_printf(m, "siblings\t: %d\n", c->x86_num_cores * smp_num_siblings);
 #endif
 	
 	/* We use exception 16 if we have hardware math and we've either seen it or the CPU claims it is internal */
_
