From: Mario Limonciello <mario.limonciello@amd.com>
To: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com>, gautham.shenoy@amd.com
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] cpufreq/amd-pstate: Add offline, online and suspend callbacks for amd_pstate_driver
Date: Tue, 15 Apr 2025 09:35:47 -0500 [thread overview]
Message-ID: <50b0e014-b359-4762-add5-a4835afd372f@amd.com> (raw)
In-Reply-To: <20250415102118.694999-2-dhananjay.ugwekar@amd.com>
On 4/15/2025 5:21 AM, Dhananjay Ugwekar wrote:
> Rename and use the existing amd_pstate_epp callbacks for amd_pstate driver
> as well. Remove the debug print in online callback while at it.
>
> These callbacks will be needed to support the "Requested CPU Min Frequency"
> BIOS option.
>
> Signed-off-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
> drivers/cpufreq/amd-pstate.c | 17 +++++++++--------
> 1 file changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index c29840ba3b30..02de51001eba 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -1568,19 +1568,17 @@ static int amd_pstate_epp_set_policy(struct cpufreq_policy *policy)
> return 0;
> }
>
> -static int amd_pstate_epp_cpu_online(struct cpufreq_policy *policy)
> +static int amd_pstate_cpu_online(struct cpufreq_policy *policy)
> {
> - pr_debug("AMD CPU Core %d going online\n", policy->cpu);
> -
> return amd_pstate_cppc_enable(policy);
> }
>
> -static int amd_pstate_epp_cpu_offline(struct cpufreq_policy *policy)
> +static int amd_pstate_cpu_offline(struct cpufreq_policy *policy)
> {
> return 0;
> }
>
> -static int amd_pstate_epp_suspend(struct cpufreq_policy *policy)
> +static int amd_pstate_suspend(struct cpufreq_policy *policy)
> {
> struct amd_cpudata *cpudata = policy->driver_data;
>
> @@ -1618,6 +1616,9 @@ static struct cpufreq_driver amd_pstate_driver = {
> .fast_switch = amd_pstate_fast_switch,
> .init = amd_pstate_cpu_init,
> .exit = amd_pstate_cpu_exit,
> + .online = amd_pstate_cpu_online,
> + .offline = amd_pstate_cpu_offline,
> + .suspend = amd_pstate_suspend,
> .set_boost = amd_pstate_set_boost,
> .update_limits = amd_pstate_update_limits,
> .name = "amd-pstate",
> @@ -1630,9 +1631,9 @@ static struct cpufreq_driver amd_pstate_epp_driver = {
> .setpolicy = amd_pstate_epp_set_policy,
> .init = amd_pstate_epp_cpu_init,
> .exit = amd_pstate_epp_cpu_exit,
> - .offline = amd_pstate_epp_cpu_offline,
> - .online = amd_pstate_epp_cpu_online,
> - .suspend = amd_pstate_epp_suspend,
> + .offline = amd_pstate_cpu_offline,
> + .online = amd_pstate_cpu_online,
> + .suspend = amd_pstate_suspend,
> .resume = amd_pstate_epp_resume,
> .update_limits = amd_pstate_update_limits,
> .set_boost = amd_pstate_set_boost,
next prev parent reply other threads:[~2025-04-15 14:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 10:21 [PATCH 0/2] Add support for "Requested CPU Min Frequency" BIOS option Dhananjay Ugwekar
2025-04-15 10:21 ` [PATCH 1/2] cpufreq/amd-pstate: Add offline, online and suspend callbacks for amd_pstate_driver Dhananjay Ugwekar
2025-04-15 14:35 ` Mario Limonciello [this message]
2025-04-15 10:21 ` [PATCH 2/2] cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency" BIOS option Dhananjay Ugwekar
2025-04-15 20:54 ` Mario Limonciello
2025-04-16 3:29 ` Dhananjay Ugwekar
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=50b0e014-b359-4762-add5-a4835afd372f@amd.com \
--to=mario.limonciello@amd.com \
--cc=dhananjay.ugwekar@amd.com \
--cc=gautham.shenoy@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.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