cpufreq: arm-big-little: don't use cpu_last_req_freq for MP
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 8 Aug 2013 14:26:26 +0000 (15:26 +0100)
committerMark Brown <broonie@linaro.org>
Thu, 8 Aug 2013 21:01:58 +0000 (22:01 +0100)
commit5afafbe8bf6678b37e55aedb86830223d0da23bf
tree3ed92f6c0c61ff8a570b7cf61e47d3f3d727747b
parentc9efd2b2d5557099542d3b29824f3445404cb7cd
cpufreq: arm-big-little: don't use cpu_last_req_freq for MP

While getting support for In-Kernel-Switcher in big LITTLE cpufreq driver we
introduced cpu_last_req_freq per-cpu variable that stores the last frequency
requested for a cpu. It was important for IKS as CPUs in the same cluster can
have separate struct cpufreq_policy associated with them and so cpufreq core may
try to set different frequencies on both CPUs of same cluster.

But for non-IKS solution or MP we don't need to cache last requested frequency.
Currently there is a bug in code where if cpufreq_driver->get() is called for
any cpu other than policy->cpu, we are returning 0, because we set
cpu_last_req_freq only for policy->cpu and not for others.

This problem could have been fixed by setting cpu_last_req_freq for all CPUs in
policy->cpus, but that wouldn't be the best solution. Purpose of
cpufreq_driver->get() is to get exact frequency from the hardware instead of
returning cached frequency that was last requested as that is already present
with the core.

Hence, this patch forces only IKS to use cpu_last_req_freq and not MP. We will
get the frequency from hardware when ->get() is called for MP.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/cpufreq/arm_big_little.c