diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2013-03-24 02:26:43 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-04-02 09:24:00 -0400 |
commit | b43a7ffbf33be7e4d3b10b7714ee663ea2c52fe2 (patch) | |
tree | 7d3ac2733d76a785be12bfba75bfe244a5a31460 /arch/sh | |
parent | fd143b4d6fb763183ef6e46d1ab84a42c59079af (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/sh')
-rw-r--r-- | arch/sh/kernel/cpufreq.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/sh/kernel/cpufreq.c b/arch/sh/kernel/cpufreq.c index e68b45b6f3f9..2c7bd94f95ee 100644 --- a/arch/sh/kernel/cpufreq.c +++ b/arch/sh/kernel/cpufreq.c | |||
@@ -69,15 +69,14 @@ static int sh_cpufreq_target(struct cpufreq_policy *policy, | |||
69 | 69 | ||
70 | dev_dbg(dev, "requested frequency %u Hz\n", target_freq * 1000); | 70 | dev_dbg(dev, "requested frequency %u Hz\n", target_freq * 1000); |
71 | 71 | ||
72 | freqs.cpu = cpu; | ||
73 | freqs.old = sh_cpufreq_get(cpu); | 72 | freqs.old = sh_cpufreq_get(cpu); |
74 | freqs.new = (freq + 500) / 1000; | 73 | freqs.new = (freq + 500) / 1000; |
75 | freqs.flags = 0; | 74 | freqs.flags = 0; |
76 | 75 | ||
77 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 76 | cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); |
78 | set_cpus_allowed_ptr(current, &cpus_allowed); | 77 | set_cpus_allowed_ptr(current, &cpus_allowed); |
79 | clk_set_rate(cpuclk, freq); | 78 | clk_set_rate(cpuclk, freq); |
80 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 79 | cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); |
81 | 80 | ||
82 | dev_dbg(dev, "set frequency %lu Hz\n", freq); | 81 | dev_dbg(dev, "set frequency %lu Hz\n", freq); |
83 | 82 | ||