tree 90211f4868d427928747f8e20290a313a6a1e80b
parent bf38d066d679096cb89421281129a02d9a024c46
author Andi Kleen <[EMAIL PROTECTED]> Tue Apr 12 08:25:22 2005
committer Linus Torvalds <[EMAIL PROTECTED]> Tue Apr 12 08:25:22 2005

[PATCH] x86-64/i386: Revert cpuinfo siblings behaviour back to 2.6.10

Only display physical id/siblings when there are siblings or dual core.

In 2.6.11 I accidentially broke it and it was always displaying these
fields But for compatibility to all these /proc parsers around it is better
to do it in the old way again.  

Noticed by Suresh Siddha

Cc: <[EMAIL PROTECTED]>
Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 i386/kernel/cpu/proc.c |    7 +++++--
 x86_64/kernel/setup.c  |    8 ++++++--
 2 files changed, 11 insertions(+), 4 deletions(-)

Index: arch/i386/kernel/cpu/proc.c
===================================================================
--- 7a2c90eec8597d751ce55618fdf1541595588e96/arch/i386/kernel/cpu/proc.c  
(mode:100644 sha1:9f5e5df038275a687b41e65f413f5671902f97f6)
+++ 90211f4868d427928747f8e20290a313a6a1e80b/arch/i386/kernel/cpu/proc.c  
(mode:100644 sha1:413c1d09091c83c77458669e9c56d87d97a789b4)
@@ -94,8 +94,11 @@
        if (c->x86_cache_size >= 0)
                seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size);
 #ifdef CONFIG_X86_HT
-       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);
+       if (c->x86_num_cores * smp_num_siblings > 1) {
+               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 */
Index: arch/x86_64/kernel/setup.c
===================================================================
--- 7a2c90eec8597d751ce55618fdf1541595588e96/arch/x86_64/kernel/setup.c  
(mode:100644 sha1:745a03ee8bf324310d37c825f63a6d7923703476)
+++ 90211f4868d427928747f8e20290a313a6a1e80b/arch/x86_64/kernel/setup.c  
(mode:100644 sha1:61cdf59c62a7de1281b245e992b077511aefb2a6)
@@ -1113,8 +1113,12 @@
                seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size);
        
 #ifdef CONFIG_SMP
-       seq_printf(m, "physical id\t: %d\n", phys_proc_id[c - cpu_data]);
-       seq_printf(m, "siblings\t: %d\n", c->x86_num_cores * smp_num_siblings);
+       if (smp_num_siblings * c->x86_num_cores > 1) {
+               int cpu = c - cpu_data;
+               seq_printf(m, "physical id\t: %d\n", phys_proc_id[cpu]);
+               seq_printf(m, "siblings\t: %d\n",
+                               c->x86_num_cores * smp_num_siblings);
+       }
 #endif 
 
        seq_printf(m,
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to