Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88813
b: refs/heads/master
c: 904541e
h: refs/heads/master
i:
  88811: 9c48970
v: v3
  • Loading branch information
Glauber de Oliveira Costa authored and Ingo Molnar committed Apr 17, 2008
1 parent ec9e0c0 commit f8cfa33
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e1a14d0c1391627d869c0f97bb5e2382bf36d8dc
refs/heads/master: 904541e2f76bc3efe4cc9978b7adb3323ea8607e
20 changes: 20 additions & 0 deletions trunk/arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,26 @@ void __init smp_alloc_memory(void)
}
#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
void remove_siblinginfo(int cpu)
{
Expand Down
17 changes: 2 additions & 15 deletions trunk/arch/x86/kernel/smpboot_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,13 +790,13 @@ static int __init smp_sanity_check(unsigned max_cpus)
return 0;
}

extern void impress_friends(void);
/*
* Cycle through the processors sending APIC IPIs to boot each.
*/
static void __init smp_boot_cpus(unsigned int max_cpus)
{
int apicid, cpu, bit, kicked;
unsigned long bogosum = 0;

/*
* Setup boot CPU information
Expand Down Expand Up @@ -863,20 +863,7 @@ static void __init smp_boot_cpus(unsigned int max_cpus)
*/
smpboot_restore_warm_reset_vector();

/*
* 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");
impress_friends();

if (smp_b_stepping)
printk(KERN_WARNING "WARNING: SMP operation may be unreliable with B stepping processors.\n");
Expand Down

0 comments on commit f8cfa33

Please sign in to comment.