mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "zhenglifeng (A)" <zhenglifeng1@huawei.com>
To: Mario Limonciello <mario.limonciello@amd.com>,
	<rafael@kernel.org>, <viresh.kumar@linaro.org>,
	<perry.yuan@amd.com>
Cc: <linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linuxarm@huawei.com>, <jonathan.cameron@huawei.com>,
	<zhanjie9@hisilicon.com>, <lihuisong@huawei.com>,
	<fanghao11@huawei.com>
Subject: Re: [PATCH] cpufreq/amd-pstate: Fix per-policy boost flag incorrect when fail
Date: Mon, 6 Jan 2025 15:54:47 +0800	[thread overview]
Message-ID: <50f2c002-21c7-4c41-8992-8469b697b8b7@huawei.com> (raw)
In-Reply-To: <7e777177-417e-41eb-81d0-3635769d3a83@amd.com>

On 2025/1/4 0:56, Mario Limonciello wrote:

> On 1/3/2025 01:41, Lifeng Zheng wrote:
>> Commit c8c68c38b56f ("cpufreq: amd-pstate: initialize core precision
>> boost state") sets per-policy boost flag to false when boost fail.
>> However, this boost flag will be set to reverse value in
>> store_local_boost() and cpufreq_boost_trigger_state() in cpufreq.c. This
>> will cause the per-policy boost flag set to true when fail to set boost.
>> Remove the extra assignment in amd_pstate_set_boost() and keep all
>> operations on per-policy boost flag outside of set_boost() to fix this
>> problem.
>>
>> Fixes: c8c68c38b56f ("cpufreq: amd-pstate: initialize core precision boost state")
>> Signed-off-by: Lifeng Zheng <zhenglifeng1@huawei.com>
>> ---
> 
> Hi There,
> 
> Thanks for the patch.  Unfortunately, it doesn't apply to the current linux-next branch at https://git.kernel.org/pub/scm/linux/kernel/git/superm1/linux.git
> 
> Although the issue you identified is still valid, there have been other contextual changes in the function [1].  Can you rebase on that branch, test it again and send a v2?
> 
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/superm1/linux.git/tree/drivers/cpufreq/amd-pstate.c?h=linux-next#n750
> 
> Thanks!

Thanks, I'll test on this branch and send a v2.

> 
>>   drivers/cpufreq/amd-pstate.c | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
>> index 66e5dfc711c0..4ce923788f3a 100644
>> --- a/drivers/cpufreq/amd-pstate.c
>> +++ b/drivers/cpufreq/amd-pstate.c
>> @@ -730,7 +730,6 @@ static int amd_pstate_set_boost(struct cpufreq_policy *policy, int state)
>>       mutex_lock(&amd_pstate_driver_lock);
>>       ret = amd_pstate_cpu_boost_update(policy, state);
>>       WRITE_ONCE(cpudata->boost_state, !ret ? state : false);
>> -    policy->boost_enabled = !ret ? state : false;
>>       refresh_frequency_limits(policy);
>>       mutex_unlock(&amd_pstate_driver_lock);
>>   
> 


  reply	other threads:[~2025-01-06  7:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-03  7:41 Lifeng Zheng
2025-01-03 16:56 ` Mario Limonciello
2025-01-06  7:54   ` zhenglifeng (A) [this message]
2025-01-08  1:31   ` zhenglifeng (A)
2025-01-08  2:26     ` Mario Limonciello
2025-01-08  9:47       ` zhenglifeng (A)

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=50f2c002-21c7-4c41-8992-8469b697b8b7@huawei.com \
    --to=zhenglifeng1@huawei.com \
    --cc=fanghao11@huawei.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=lihuisong@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mario.limonciello@amd.com \
    --cc=perry.yuan@amd.com \
    --cc=rafael@kernel.org \
    --cc=viresh.kumar@linaro.org \
    --cc=zhanjie9@hisilicon.com \
    /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

all inboxes | Powered by JetHome®