diff options
author | Anson Huang <b20788@freescale.com> | 2012-06-06 09:36:09 +0800 |
---|---|---|
committer | Xinyu Chen <xinyu.chen@freescale.com> | 2012-06-07 16:41:19 +0800 |
commit | b89a2eccf2037e92963c6627746ce1551e8ade9c (patch) | |
tree | e4ba1aa06045508b315651b0a83efc5a5c5cfbff /init | |
parent | bdb02da7d309fa84a2d418d00085ca449d00d4c3 (diff) |
ENGR00212490 [SMP]Fix build error of calibrate when no define SMP
Fix build error, only under SMP enviroment, we use per_cpu cpu_data
to decide to redo calibrate delay or skip.
Signed-off-by: Anson Huang <b20788@freescale.com>
Diffstat (limited to 'init')
-rw-r--r-- | init/calibrate.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/init/calibrate.c b/init/calibrate.c index ebab7b344a65..a4f57ff1efbd 100644 --- a/init/calibrate.c +++ b/init/calibrate.c @@ -249,13 +249,16 @@ void __cpuinit calibrate_delay(void) { unsigned long lpj; static bool printed; +#ifdef CONFIG_SMP int this_cpu = smp_processor_id(); - if (per_cpu(cpu_data, this_cpu).loops_per_jiffy) { lpj = per_cpu(cpu_data, this_cpu).loops_per_jiffy; pr_info("Calibrating delay loop (skipped) " "already calibrated this CPU"); } else if (preset_lpj) { +#else + if (preset_lpj) { +#endif lpj = preset_lpj; if (!printed) pr_info("Calibrating delay loop (skipped) " @@ -273,7 +276,9 @@ void __cpuinit calibrate_delay(void) pr_info("Calibrating delay loop... "); lpj = calibrate_delay_converge(); } +#ifdef CONFIG_SMP per_cpu(cpu_data, this_cpu).loops_per_jiffy = lpj; +#endif if (!printed) pr_cont("%lu.%02lu BogoMIPS (lpj=%lu)\n", lpj/(500000/HZ), |