diff mbox

[v2] ARM: ux500: send cpufreq notification for all cpus

Message ID 1314253880-2438-1-git-send-email-vincent.guittot@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Vincent Guittot Aug. 25, 2011, 6:31 a.m. UTC
The same clock is used for all cpus so we must notify the frequency change
for each one in order to update the configuration of all twd clockevents.

change since V1:
* use policy->cpus instead of cpu_online_mask

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
---
 drivers/cpufreq/db8500-cpufreq.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

Comments

Linus Walleij Aug. 29, 2011, 9:44 a.m. UTC | #1
On Thu, Aug 25, 2011 at 8:31 AM, Vincent Guittot
<vincent.guittot@linaro.org> wrote:

> The same clock is used for all cpus so we must notify the frequency change
> for each one in order to update the configuration of all twd clockevents.
>
> change since V1:
> * use policy->cpus instead of cpu_online_mask
>
> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Dave, are you picking this up?

Yours,
Linus Walleij
Dave Jones Aug. 29, 2011, 3:28 p.m. UTC | #2
On Mon, Aug 29, 2011 at 11:44:31AM +0200, Linus Walleij wrote:
 > On Thu, Aug 25, 2011 at 8:31 AM, Vincent Guittot
 > <vincent.guittot@linaro.org> wrote:
 > 
 > > The same clock is used for all cpus so we must notify the frequency change
 > > for each one in order to update the configuration of all twd clockevents.
 > >
 > > change since V1:
 > > * use policy->cpus instead of cpu_online_mask
 > >
 > > Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
 > 
 > Acked-by: Linus Walleij <linus.walleij@linaro.org>
 > 
 > Dave, are you picking this up?

yeah, I have it queued. I'll get to it today.

thanks,

	Dave
diff mbox

Patch

diff --git a/drivers/cpufreq/db8500-cpufreq.c b/drivers/cpufreq/db8500-cpufreq.c
index 0d8dd1c..b893f9b 100644
--- a/drivers/cpufreq/db8500-cpufreq.c
+++ b/drivers/cpufreq/db8500-cpufreq.c
@@ -76,13 +76,13 @@  static int db8500_cpufreq_target(struct cpufreq_policy *policy,
 
 	freqs.old = policy->cur;
 	freqs.new = freq_table[idx].frequency;
-	freqs.cpu = policy->cpu;
 
 	if (freqs.old == freqs.new)
 		return 0;
 
 	/* pre-change notification */
-	cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
+	for_each_cpu(freqs.cpu, policy->cpus)
+		cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
 
 	/* request the PRCM unit for opp change */
 	if (prcmu_set_arm_opp(idx2opp[idx])) {
@@ -91,7 +91,8 @@  static int db8500_cpufreq_target(struct cpufreq_policy *policy,
 	}
 
 	/* post change notification */
-	cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
+	for_each_cpu(freqs.cpu, policy->cpus)
+		cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
 
 	return 0;
 }