diff options
author | Glauber de Oliveira Costa <gcosta@redhat.com> | 2008-03-19 13:25:27 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:01 -0400 |
commit | 904541e2f76bc3efe4cc9978b7adb3323ea8607e (patch) | |
tree | cd2f2d107fb324a5bb9c8a14e0b83362175d0543 /arch | |
parent | e1a14d0c1391627d869c0f97bb5e2382bf36d8dc (diff) |
x86: allow user to impress friends.
Impressing friends is a very important thing.
Do it in a separate function to make it even more
explicit, and ease integration.
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/smpboot.c | 20 | ||||
-rw-r--r-- | arch/x86/kernel/smpboot_32.c | 17 |
2 files changed, 22 insertions, 15 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index a157a5245923..02427d1003d3 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -228,6 +228,26 @@ void __init smp_alloc_memory(void) | |||
228 | } | 228 | } |
229 | #endif | 229 | #endif |
230 | 230 | ||
231 | void impress_friends(void) | ||
232 | { | ||
233 | int cpu; | ||
234 | unsigned long bogosum = 0; | ||
235 | /* | ||
236 | * Allow the user to impress friends. | ||
237 | */ | ||
238 | Dprintk("Before bogomips.\n"); | ||
239 | for_each_possible_cpu(cpu) | ||
240 | if (cpu_isset(cpu, cpu_callout_map)) | ||
241 | bogosum += cpu_data(cpu).loops_per_jiffy; | ||
242 | printk(KERN_INFO | ||
243 | "Total of %d processors activated (%lu.%02lu BogoMIPS).\n", | ||
244 | cpus_weight(cpu_present_map), | ||
245 | bogosum/(500000/HZ), | ||
246 | (bogosum/(5000/HZ))%100); | ||
247 | |||
248 | Dprintk("Before bogocount - setting activated=1.\n"); | ||
249 | } | ||
250 | |||
231 | #ifdef CONFIG_HOTPLUG_CPU | 251 | #ifdef CONFIG_HOTPLUG_CPU |
232 | void remove_siblinginfo(int cpu) | 252 | void remove_siblinginfo(int cpu) |
233 | { | 253 | { |
diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c index 5c4e85cceb16..34493f8ba8ac 100644 --- a/arch/x86/kernel/smpboot_32.c +++ b/arch/x86/kernel/smpboot_32.c | |||
@@ -790,13 +790,13 @@ static int __init smp_sanity_check(unsigned max_cpus) | |||
790 | return 0; | 790 | return 0; |
791 | } | 791 | } |
792 | 792 | ||
793 | extern void impress_friends(void); | ||
793 | /* | 794 | /* |
794 | * Cycle through the processors sending APIC IPIs to boot each. | 795 | * Cycle through the processors sending APIC IPIs to boot each. |
795 | */ | 796 | */ |
796 | static void __init smp_boot_cpus(unsigned int max_cpus) | 797 | static void __init smp_boot_cpus(unsigned int max_cpus) |
797 | { | 798 | { |
798 | int apicid, cpu, bit, kicked; | 799 | int apicid, cpu, bit, kicked; |
799 | unsigned long bogosum = 0; | ||
800 | 800 | ||
801 | /* | 801 | /* |
802 | * Setup boot CPU information | 802 | * Setup boot CPU information |
@@ -863,20 +863,7 @@ static void __init smp_boot_cpus(unsigned int max_cpus) | |||
863 | */ | 863 | */ |
864 | smpboot_restore_warm_reset_vector(); | 864 | smpboot_restore_warm_reset_vector(); |
865 | 865 | ||
866 | /* | 866 | impress_friends(); |
867 | * Allow the user to impress friends. | ||
868 | */ | ||
869 | Dprintk("Before bogomips.\n"); | ||
870 | for_each_possible_cpu(cpu) | ||
871 | if (cpu_isset(cpu, cpu_callout_map)) | ||
872 | bogosum += cpu_data(cpu).loops_per_jiffy; | ||
873 | printk(KERN_INFO | ||
874 | "Total of %d processors activated (%lu.%02lu BogoMIPS).\n", | ||
875 | cpus_weight(cpu_present_map), | ||
876 | bogosum/(500000/HZ), | ||
877 | (bogosum/(5000/HZ))%100); | ||
878 | |||
879 | Dprintk("Before bogocount - setting activated=1.\n"); | ||
880 | 867 | ||
881 | if (smp_b_stepping) | 868 | if (smp_b_stepping) |
882 | printk(KERN_WARNING "WARNING: SMP operation may be unreliable with B stepping processors.\n"); | 869 | printk(KERN_WARNING "WARNING: SMP operation may be unreliable with B stepping processors.\n"); |