From: Stephen Boyd <sboyd@codeaurora.org>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"cpufreq@vger.kernel.org" <cpufreq@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"Rafael J . Wysocki" <rjw@sisk.pl>
Subject: Re: [PATCH] cpufreq: Don't use smp_processor_id() in preemptible context
Date: Wed, 28 Aug 2013 09:26:54 -0700 [thread overview]
Message-ID: <521E24CE.9090407@codeaurora.org> (raw)
In-Reply-To: <CAKohpo=RLmXK+vX9b7yBOGiS=d0ZEt3RpJETNvBeSRhYfoYWuA@mail.gmail.com>
On 08/27/13 23:34, Viresh Kumar wrote:
> On 28 August 2013 03:31, Stephen Boyd <sboyd@codeaurora.org> wrote:
>> diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c
>> index b9b20fd..523af48 100644
>> --- a/drivers/cpufreq/cpufreq_governor.c
>> +++ b/drivers/cpufreq/cpufreq_governor.c
>> @@ -137,7 +137,7 @@ void gov_queue_work(struct dbs_data *dbs_data, struct cpufreq_policy *policy,
>> return;
>>
>> if (!all_cpus) {
>> - __gov_queue_work(smp_processor_id(), dbs_data, delay);
>> + __gov_queue_work(policy->cpu, dbs_data, delay);
> This is probably wrong.. We wanted to queue work on current cpu and
> not policy->cpu.. Can you use raw_smp_processor_id()?
Ah right, for the case where the policy covers more than one cpu.
raw_smp_processor_id() would work but it probably also needs a large
comment. I'll resend with that.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2013-08-28 16:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-26 22:45 [PATCH] cpufreq: Fix timer/workqueue corruption due to double queueing Stephen Boyd
2013-08-27 6:31 ` Viresh Kumar
2013-08-27 18:47 ` Stephen Boyd
2013-08-27 22:01 ` [PATCH] cpufreq: Don't use smp_processor_id() in preemptible context Stephen Boyd
2013-08-28 6:34 ` Viresh Kumar
2013-08-28 16:26 ` Stephen Boyd [this message]
2013-08-28 21:24 ` [PATCH v2] " Stephen Boyd
2013-08-29 4:20 ` Viresh Kumar
2013-08-29 20:31 ` Rafael J. Wysocki
2013-08-28 5:37 ` [PATCH] cpufreq: Fix timer/workqueue corruption due to double queueing Viresh Kumar
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=521E24CE.9090407@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=cpufreq@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=viresh.kumar@linaro.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).