aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
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-pxa
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-pxa')
-rw-r--r--arch/arm/mach-pxa/cpufreq-pxa2xx.c5
-rw-r--r--arch/arm/mach-pxa/cpufreq-pxa3xx.c5
2 files changed, 4 insertions, 6 deletions
diff --git a/arch/arm/mach-pxa/cpufreq-pxa2xx.c b/arch/arm/mach-pxa/cpufreq-pxa2xx.c
index 6a7aeab42f6c..f1ca4daa1ad6 100644
--- a/arch/arm/mach-pxa/cpufreq-pxa2xx.c
+++ b/arch/arm/mach-pxa/cpufreq-pxa2xx.c
@@ -311,7 +311,6 @@ static int pxa_set_target(struct cpufreq_policy *policy,
311 new_freq_mem = pxa_freq_settings[idx].membus; 311 new_freq_mem = pxa_freq_settings[idx].membus;
312 freqs.old = policy->cur; 312 freqs.old = policy->cur;
313 freqs.new = new_freq_cpu; 313 freqs.new = new_freq_cpu;
314 freqs.cpu = policy->cpu;
315 314
316 if (freq_debug) 315 if (freq_debug)
317 pr_debug("Changing CPU frequency to %d Mhz, (SDRAM %d Mhz)\n", 316 pr_debug("Changing CPU frequency to %d Mhz, (SDRAM %d Mhz)\n",
@@ -327,7 +326,7 @@ static int pxa_set_target(struct cpufreq_policy *policy,
327 * you should add a notify client with any platform specific 326 * you should add a notify client with any platform specific
328 * Vcc changing capability 327 * Vcc changing capability
329 */ 328 */
330 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 329 cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
331 330
332 /* Calculate the next MDREFR. If we're slowing down the SDRAM clock 331 /* Calculate the next MDREFR. If we're slowing down the SDRAM clock
333 * we need to preset the smaller DRI before the change. If we're 332 * we need to preset the smaller DRI before the change. If we're
@@ -382,7 +381,7 @@ static int pxa_set_target(struct cpufreq_policy *policy,
382 * you should add a notify client with any platform specific 381 * you should add a notify client with any platform specific
383 * SDRAM refresh timer adjustments 382 * SDRAM refresh timer adjustments
384 */ 383 */
385 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 384 cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
386 385
387 /* 386 /*
388 * Even if voltage setting fails, we don't report it, as the frequency 387 * Even if voltage setting fails, we don't report it, as the frequency
diff --git a/arch/arm/mach-pxa/cpufreq-pxa3xx.c b/arch/arm/mach-pxa/cpufreq-pxa3xx.c
index b85b4ab7aac6..8c45b2b926a7 100644
--- a/arch/arm/mach-pxa/cpufreq-pxa3xx.c
+++ b/arch/arm/mach-pxa/cpufreq-pxa3xx.c
@@ -184,7 +184,6 @@ static int pxa3xx_cpufreq_set(struct cpufreq_policy *policy,
184 184
185 freqs.old = policy->cur; 185 freqs.old = policy->cur;
186 freqs.new = next->cpufreq_mhz * 1000; 186 freqs.new = next->cpufreq_mhz * 1000;
187 freqs.cpu = policy->cpu;
188 187
189 pr_debug("CPU frequency from %d MHz to %d MHz%s\n", 188 pr_debug("CPU frequency from %d MHz to %d MHz%s\n",
190 freqs.old / 1000, freqs.new / 1000, 189 freqs.old / 1000, freqs.new / 1000,
@@ -193,14 +192,14 @@ static int pxa3xx_cpufreq_set(struct cpufreq_policy *policy,
193 if (freqs.old == target_freq) 192 if (freqs.old == target_freq)
194 return 0; 193 return 0;
195 194
196 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 195 cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
197 196
198 local_irq_save(flags); 197 local_irq_save(flags);
199 __update_core_freq(next); 198 __update_core_freq(next);
200 __update_bus_freq(next); 199 __update_bus_freq(next);
201 local_irq_restore(flags); 200 local_irq_restore(flags);
202 201
203 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 202 cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
204 203
205 return 0; 204 return 0;
206} 205}