aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2005-01-11 01:48:14 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-11 01:48:14 -0800
commit42382d56082e4a545f0d0851f9b57d4ba30faab0 (patch)
tree1aeaabf8e9b236e6a870030f4786842d454807e2 /arch
parentb9662b21dd274ff9c9d1ddbc85b90f7cebf38d03 (diff)
downloadhistory-42382d56082e4a545f0d0851f9b57d4ba30faab0.tar.gz
[PATCH] i386: Count both multi cores and SMP siblings in /proc/cpuinfo siblings.
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> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/kernel/cpu/common.c2
-rw-r--r--arch/i386/kernel/cpu/intel.c2
-rw-r--r--arch/i386/kernel/cpu/proc.c7
3 files changed, 4 insertions, 7 deletions
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c
index 5761150d84e071..b619be984d5a88 100644
--- a/arch/i386/kernel/cpu/common.c
+++ b/arch/i386/kernel/cpu/common.c
@@ -437,6 +437,7 @@ void __init dodgy_tsc(void)
cpu_devs[X86_VENDOR_CYRIX]->c_init(&boot_cpu_data);
}
+#ifdef CONFIG_X86_HT
void __init detect_ht(struct cpuinfo_x86 *c)
{
u32 eax, ebx, ecx, edx;
@@ -478,6 +479,7 @@ void __init detect_ht(struct cpuinfo_x86 *c)
phys_proc_id[cpu]);
}
}
+#endif
void __init print_cpu_info(struct cpuinfo_x86 *c)
{
diff --git a/arch/i386/kernel/cpu/intel.c b/arch/i386/kernel/cpu/intel.c
index ec3858cf4c5a05..b8d847b850dc66 100644
--- a/arch/i386/kernel/cpu/intel.c
+++ b/arch/i386/kernel/cpu/intel.c
@@ -139,9 +139,7 @@ static void __init init_intel(struct cpuinfo_x86 *c)
if ( p )
strcpy(c->x86_model_id, p);
-#ifdef CONFIG_X86_HT
detect_ht(c);
-#endif
/* Work around errata */
Intel_errata_workarounds(c);
diff --git a/arch/i386/kernel/cpu/proc.c b/arch/i386/kernel/cpu/proc.c
index 8c179a94813145..c8d83fdc237a35 100644
--- a/arch/i386/kernel/cpu/proc.c
+++ b/arch/i386/kernel/cpu/proc.c
@@ -94,11 +94,8 @@ 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 (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 */