aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-integrator
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-03-24 02:26:43 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-04-02 09:24:00 -0400
commitb43a7ffbf33be7e4d3b10b7714ee663ea2c52fe2 (patch)
tree7d3ac2733d76a785be12bfba75bfe244a5a31460 /arch/arm/mach-integrator
parentfd143b4d6fb763183ef6e46d1ab84a42c59079af (diff)
cpufreq: Notify all policy->cpus in cpufreq_notify_transition()
policy->cpus contains all online cpus that have single shared clock line. And their frequencies are always updated together. Many SMP system's cpufreq drivers take care of this in individual drivers but the best place for this code is in cpufreq core. This patch modifies cpufreq_notify_transition() to notify frequency change for all cpus in policy->cpus and hence updates all users of this API. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'arch/arm/mach-integrator')
-rw-r--r--arch/arm/mach-integrator/cpu.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm/mach-integrator/cpu.c b/arch/arm/mach-integrator/cpu.c
index 590c192cdf4d..df863c30771c 100644
--- a/arch/arm/mach-integrator/cpu.c
+++ b/arch/arm/mach-integrator/cpu.c
@@ -123,14 +123,12 @@ static int integrator_set_target(struct cpufreq_policy *policy,
123 vco = icst_hz_to_vco(&cclk_params, target_freq * 1000); 123 vco = icst_hz_to_vco(&cclk_params, target_freq * 1000);
124 freqs.new = icst_hz(&cclk_params, vco) / 1000; 124 freqs.new = icst_hz(&cclk_params, vco) / 1000;
125 125
126 freqs.cpu = policy->cpu;
127
128 if (freqs.old == freqs.new) { 126 if (freqs.old == freqs.new) {
129 set_cpus_allowed(current, cpus_allowed); 127 set_cpus_allowed(current, cpus_allowed);
130 return 0; 128 return 0;
131 } 129 }
132 130
133 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 131 cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
134 132
135 cm_osc = __raw_readl(CM_OSC); 133 cm_osc = __raw_readl(CM_OSC);
136 134
@@ -151,7 +149,7 @@ static int integrator_set_target(struct cpufreq_policy *policy,
151 */ 149 */
152 set_cpus_allowed(current, cpus_allowed); 150 set_cpus_allowed(current, cpus_allowed);
153 151
154 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 152 cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
155 153
156 return 0; 154 return 0;
157} 155}