aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/s3c2416-cpufreq.c
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 /drivers/cpufreq/s3c2416-cpufreq.c
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 'drivers/cpufreq/s3c2416-cpufreq.c')
-rw-r--r--drivers/cpufreq/s3c2416-cpufreq.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/cpufreq/s3c2416-cpufreq.c b/drivers/cpufreq/s3c2416-cpufreq.c
index bcc053bc02c4..4f1881eee3f1 100644
--- a/drivers/cpufreq/s3c2416-cpufreq.c
+++ b/drivers/cpufreq/s3c2416-cpufreq.c
@@ -256,7 +256,6 @@ static int s3c2416_cpufreq_set_target(struct cpufreq_policy *policy,
256 goto out; 256 goto out;
257 } 257 }
258 258
259 freqs.cpu = 0;
260 freqs.flags = 0; 259 freqs.flags = 0;
261 freqs.old = s3c_freq->is_dvs ? FREQ_DVS 260 freqs.old = s3c_freq->is_dvs ? FREQ_DVS
262 : clk_get_rate(s3c_freq->armclk) / 1000; 261 : clk_get_rate(s3c_freq->armclk) / 1000;
@@ -274,7 +273,7 @@ static int s3c2416_cpufreq_set_target(struct cpufreq_policy *policy,
274 if (!to_dvs && freqs.old == freqs.new) 273 if (!to_dvs && freqs.old == freqs.new)
275 goto out; 274 goto out;
276 275
277 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 276 cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
278 277
279 if (to_dvs) { 278 if (to_dvs) {
280 pr_debug("cpufreq: enter dvs\n"); 279 pr_debug("cpufreq: enter dvs\n");
@@ -287,7 +286,7 @@ static int s3c2416_cpufreq_set_target(struct cpufreq_policy *policy,
287 ret = s3c2416_cpufreq_set_armdiv(s3c_freq, freqs.new); 286 ret = s3c2416_cpufreq_set_armdiv(s3c_freq, freqs.new);
288 } 287 }
289 288
290 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 289 cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
291 290
292out: 291out:
293 mutex_unlock(&cpufreq_lock); 292 mutex_unlock(&cpufreq_lock);