From: Xiongfeng Wang <wangxiongfeng2@huawei.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: <rjw@rjwysocki.net>, <Souvik.Chakravarty@arm.com>,
<Thanu.Rangarajan@arm.com>, <Sudeep.Holla@arm.com>,
<guohanjun@huawei.com>, <john.garry@huawei.com>,
<jonathan.cameron@huawei.com>, <linux-pm@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH v2 1/3] cpufreq: handle the return value of '.set_boost()' properly
Date: Tue, 19 May 2020 09:12:45 +0800 [thread overview]
Message-ID: <115bf0d2-8f23-d82b-3d2a-41dd3f124343@huawei.com> (raw)
In-Reply-To: <20200518114348.z55kpbhgbfxenrhm@vireshk-i7>
Hi Viresh,
On 2020/5/18 19:43, Viresh Kumar wrote:
> On 18-05-20, 13:16, Viresh Kumar wrote:
>> On 18-05-20, 15:10, Xiongfeng Wang wrote:
>>> 'freq_qos_update_request()' called by 'cpufreq_boost_set_sw()' reutrns 1
>>> when the effective constraint value of frequency QoS has changed. It's
>>> not an error code. So handle the return value 1 of '.set_boost()' in
>>> 'cpufreq_boost_trigger_state()' properly.
>>>
>>> Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
>>> ---
>>> drivers/cpufreq/cpufreq.c | 5 ++++-
>>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
>>> index 4adac3a..bb6746e 100644
>>> --- a/drivers/cpufreq/cpufreq.c
>>> +++ b/drivers/cpufreq/cpufreq.c
>>> @@ -2540,7 +2540,10 @@ int cpufreq_boost_trigger_state(int state)
>>> write_unlock_irqrestore(&cpufreq_driver_lock, flags);
>>>
>>> ret = cpufreq_driver->set_boost(state);
>>> - if (ret) {
>>> + if (ret == 1) {
>>> + pr_debug("The effective constraint value of frequency QoS has changed.\n");
>>> + return 0;
>>> + } else if (ret) {
>>
>> Rafael, IMO it is better to pick patch from Sergey for this as this is
>> implementation detail.
>>
>>> write_lock_irqsave(&cpufreq_driver_lock, flags);
>>> cpufreq_driver->boost_enabled = !state;
>>> write_unlock_irqrestore(&cpufreq_driver_lock, flags);
>
> This is already fixed in the PM tree with a different patch Xiongfeng.
Thanks for telling me. I will drop it in the next version.
Thanks,
Xiongfeng
>
next prev parent reply other threads:[~2020-05-19 1:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-18 7:10 [RFC PATCH v2 0/3] add SW BOOST support for CPPC Xiongfeng Wang
2020-05-18 7:10 ` [RFC PATCH v2 1/3] cpufreq: handle the return value of '.set_boost()' properly Xiongfeng Wang
2020-05-18 7:46 ` Viresh Kumar
2020-05-18 11:43 ` Viresh Kumar
2020-05-19 1:12 ` Xiongfeng Wang [this message]
2020-05-18 7:10 ` [RFC PATCH v2 2/3] cpufreq: export 'cpufreq_policy_list' and make macro 'for_each_*_policy' public Xiongfeng Wang
2020-05-18 7:10 ` [RFC PATCH v2 3/3] CPPC: add support for SW BOOST Xiongfeng Wang
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=115bf0d2-8f23-d82b-3d2a-41dd3f124343@huawei.com \
--to=wangxiongfeng2@huawei.com \
--cc=Souvik.Chakravarty@arm.com \
--cc=Sudeep.Holla@arm.com \
--cc=Thanu.Rangarajan@arm.com \
--cc=guohanjun@huawei.com \
--cc=john.garry@huawei.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--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).