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>
This commit is contained in:
committed by
Ingo Molnar
parent
e1a14d0c13
commit
904541e2f7
@@ -228,6 +228,26 @@ void __init smp_alloc_memory(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void impress_friends(void)
|
||||||
|
{
|
||||||
|
int cpu;
|
||||||
|
unsigned long bogosum = 0;
|
||||||
|
/*
|
||||||
|
* Allow the user to impress friends.
|
||||||
|
*/
|
||||||
|
Dprintk("Before bogomips.\n");
|
||||||
|
for_each_possible_cpu(cpu)
|
||||||
|
if (cpu_isset(cpu, cpu_callout_map))
|
||||||
|
bogosum += cpu_data(cpu).loops_per_jiffy;
|
||||||
|
printk(KERN_INFO
|
||||||
|
"Total of %d processors activated (%lu.%02lu BogoMIPS).\n",
|
||||||
|
cpus_weight(cpu_present_map),
|
||||||
|
bogosum/(500000/HZ),
|
||||||
|
(bogosum/(5000/HZ))%100);
|
||||||
|
|
||||||
|
Dprintk("Before bogocount - setting activated=1.\n");
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_HOTPLUG_CPU
|
#ifdef CONFIG_HOTPLUG_CPU
|
||||||
void remove_siblinginfo(int cpu)
|
void remove_siblinginfo(int cpu)
|
||||||
{
|
{
|
||||||
|
@@ -790,13 +790,13 @@ static int __init smp_sanity_check(unsigned max_cpus)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern void impress_friends(void);
|
||||||
/*
|
/*
|
||||||
* Cycle through the processors sending APIC IPIs to boot each.
|
* Cycle through the processors sending APIC IPIs to boot each.
|
||||||
*/
|
*/
|
||||||
static void __init smp_boot_cpus(unsigned int max_cpus)
|
static void __init smp_boot_cpus(unsigned int max_cpus)
|
||||||
{
|
{
|
||||||
int apicid, cpu, bit, kicked;
|
int apicid, cpu, bit, kicked;
|
||||||
unsigned long bogosum = 0;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Setup boot CPU information
|
* Setup boot CPU information
|
||||||
@@ -863,20 +863,7 @@ static void __init smp_boot_cpus(unsigned int max_cpus)
|
|||||||
*/
|
*/
|
||||||
smpboot_restore_warm_reset_vector();
|
smpboot_restore_warm_reset_vector();
|
||||||
|
|
||||||
/*
|
impress_friends();
|
||||||
* Allow the user to impress friends.
|
|
||||||
*/
|
|
||||||
Dprintk("Before bogomips.\n");
|
|
||||||
for_each_possible_cpu(cpu)
|
|
||||||
if (cpu_isset(cpu, cpu_callout_map))
|
|
||||||
bogosum += cpu_data(cpu).loops_per_jiffy;
|
|
||||||
printk(KERN_INFO
|
|
||||||
"Total of %d processors activated (%lu.%02lu BogoMIPS).\n",
|
|
||||||
cpus_weight(cpu_present_map),
|
|
||||||
bogosum/(500000/HZ),
|
|
||||||
(bogosum/(5000/HZ))%100);
|
|
||||||
|
|
||||||
Dprintk("Before bogocount - setting activated=1.\n");
|
|
||||||
|
|
||||||
if (smp_b_stepping)
|
if (smp_b_stepping)
|
||||||
printk(KERN_WARNING "WARNING: SMP operation may be unreliable with B stepping processors.\n");
|
printk(KERN_WARNING "WARNING: SMP operation may be unreliable with B stepping processors.\n");
|
||||||
|
Reference in New Issue
Block a user