From: vincent.guittot@linaro.org (Vincent Guittot)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: ux500: send cpufreq notification for all cpus
Date: Wed, 24 Aug 2011 11:26:07 +0200 [thread overview]
Message-ID: <CAKfTPtDf61SpfaD8vuZePF1Z2=DrSxOSr3_89VVwUMGykBAXNA@mail.gmail.com> (raw)
In-Reply-To: <4E54B5AC.60608@ti.com>
On 24 August 2011 10:26, Santosh <santosh.shilimkar@ti.com> wrote:
> On Wednesday 24 August 2011 12:14 PM, Vincent Guittot 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.
>>
>> Signed-off-by: Vincent Guittot<vincent.guittot@linaro.org>
>> ---
>> ?drivers/cpufreq/db8500-cpufreq.c | ? ?7 ++++---
>> ?1 files changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/cpufreq/db8500-cpufreq.c
>> b/drivers/cpufreq/db8500-cpufreq.c
>> index 0d8dd1c..4cb5785 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_online_cpu(freqs.cpu)
>> + ? ? ? ? ? ? ? cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
>
> Blind notfier on all online CPU's will race. Take a example whete CPU
> is marked online but not yet registered to CPUFREQ. I have seen such a
> race in OMAP and fixed that using the policy->cpus field.
>
You're right, I'm going to use policy->cpus instead
> Regards
> Santosh
>
>
prev parent reply other threads:[~2011-08-24 9:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 6:44 [PATCH] ARM: ux500: send cpufreq notification for all cpus Vincent Guittot
2011-08-24 7:42 ` Linus Walleij
2011-08-24 7:56 ` Kyungmin Park
2011-08-24 8:02 ` Vincent Guittot
2011-08-24 8:26 ` Santosh
2011-08-24 9:26 ` Vincent Guittot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKfTPtDf61SpfaD8vuZePF1Z2=DrSxOSr3_89VVwUMGykBAXNA@mail.gmail.com' \
--to=vincent.guittot@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).