]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00223450 [MX6]Fix secondary cores BogoMIPs error
authorAnson Huang <b20788@freescale.com>
Mon, 10 Sep 2012 18:41:54 +0000 (02:41 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:12:57 +0000 (14:12 +0200)
After doing some suspend/resuem test, secondary cores BogoMIPs
will be wrong, the root cause is that when cpufreq is changed,
we only update the online cpus' loops_per_jiffy, and when secondary
cores back to online, we skip the loops_per_jiffy calibration. During
suspend/resume, the cpufreq can be changed during disabling/enabling
secondary cores, which will make secondary cores loops_per_jiffy
wrong, so here we need to update all possible cpus' loops_per_jiffy
when cpufreq is changed.

Signed-off-by: Anson Huang <b20788@freescale.com>
arch/arm/plat-mxc/cpufreq.c

index 7a06aaec02e7149c6aaaac8da3c517178d9c068a..e7278d9501a50b27d24fd09c30d459b2ea6c4a87 100755 (executable)
@@ -219,7 +219,7 @@ static int mxc_set_target(struct cpufreq_policy *policy,
          * So update it for all CPUs.
          */
 
-       for_each_cpu(i, policy->cpus)
+       for_each_possible_cpu(i)
                per_cpu(cpu_data, i).loops_per_jiffy =
                cpufreq_scale(per_cpu(cpu_data, i).loops_per_jiffy,
                                        freqs.old, freqs.new);