Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259029
b: refs/heads/master
c: 7afe184
h: refs/heads/master
i:
  259027: 3f9e180
v: v3
  • Loading branch information
Sameer Nanda authored and Linus Torvalds committed Jul 26, 2011
1 parent fb1577d commit 9149417
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 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: 469dded1839105cfbfc265376e23e24dbc48d2a7
refs/heads/master: 7afe1845dd1e7c90828c942daed7e57ffa7c38d6
11 changes: 10 additions & 1 deletion trunk/init/calibrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <linux/init.h>
#include <linux/timex.h>
#include <linux/smp.h>
#include <linux/percpu.h>

unsigned long lpj_fine;
unsigned long preset_lpj;
Expand Down Expand Up @@ -243,12 +244,19 @@ static unsigned long __cpuinit calibrate_delay_converge(void)
return lpj;
}

static DEFINE_PER_CPU(unsigned long, cpu_loops_per_jiffy) = { 0 };

void __cpuinit calibrate_delay(void)
{
unsigned long lpj;
static bool printed;
int this_cpu = smp_processor_id();

if (preset_lpj) {
if (per_cpu(cpu_loops_per_jiffy, this_cpu)) {
lpj = per_cpu(cpu_loops_per_jiffy, this_cpu);
pr_info("Calibrating delay loop (skipped) "
"already calibrated this CPU");
} else if (preset_lpj) {
lpj = preset_lpj;
if (!printed)
pr_info("Calibrating delay loop (skipped) "
Expand All @@ -266,6 +274,7 @@ void __cpuinit calibrate_delay(void)
pr_info("Calibrating delay loop... ");
lpj = calibrate_delay_converge();
}
per_cpu(cpu_loops_per_jiffy, this_cpu) = lpj;
if (!printed)
pr_cont("%lu.%02lu BogoMIPS (lpj=%lu)\n",
lpj/(500000/HZ),
Expand Down

0 comments on commit 9149417

Please sign in to comment.