aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/pcc-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/pcc-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/pcc-cpufreq.c')
-rw-r--r--drivers/cpufreq/pcc-cpufreq.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c
index 503996a94a6a..0de00081a81e 100644
--- a/drivers/cpufreq/pcc-cpufreq.c
+++ b/drivers/cpufreq/pcc-cpufreq.c
@@ -215,8 +215,7 @@ static int pcc_cpufreq_target(struct cpufreq_policy *policy,
215 (pcch_virt_addr + pcc_cpu_data->input_offset)); 215 (pcch_virt_addr + pcc_cpu_data->input_offset));
216 216
217 freqs.new = target_freq; 217 freqs.new = target_freq;
218 freqs.cpu = cpu; 218 cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
219 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
220 219
221 input_buffer = 0x1 | (((target_freq * 100) 220 input_buffer = 0x1 | (((target_freq * 100)
222 / (ioread32(&pcch_hdr->nominal) * 1000)) << 8); 221 / (ioread32(&pcch_hdr->nominal) * 1000)) << 8);
@@ -237,7 +236,7 @@ static int pcc_cpufreq_target(struct cpufreq_policy *policy,
237 } 236 }
238 iowrite16(0, &pcch_hdr->status); 237 iowrite16(0, &pcch_hdr->status);
239 238
240 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 239 cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
241 pr_debug("target: was SUCCESSFUL for cpu %d\n", cpu); 240 pr_debug("target: was SUCCESSFUL for cpu %d\n", cpu);
242 spin_unlock(&pcc_lock); 241 spin_unlock(&pcc_lock);
243 242