mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mario Limonciello <superm1@kernel.org>
To: Vishal Badole <Vishal.Badole@amd.com>
Cc: ray.huang@amd.com, rafael@kernel.org, viresh.kumar@linaro.org,
	perry.yuan@amd.com, kprateek.nayak@amd.com, hansg@kernel.org,
	ilpo.jarvinen@linux.intel.com,
	platform-driver-x86@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] cpufreq: amd-pstate: Finalize prefcore before registration
Date: Mon, 30 Nov 2026 09:38:35 -0600	[thread overview]
Message-ID: <91c29b1a-0bbb-43bf-b839-b36b580d8f38@kernel.org> (raw)
In-Reply-To: <20261125172031.741740-2-Vishal.Badole@amd.com>



On 11/25/26 11:20, Vishal Badole wrote:
> The choice between amd-hfi and preferred-core scheduling applies to the
> whole system. However, the HFI check currently runs during per-CPU
> initialization and clears the global amd_pstate_prefcore flag.
> 
> Move the check to amd_pstate_init(), after preferred-core detection and
> before driver registration.
> 
> Signed-off-by: Vishal Badole <Vishal.Badole@amd.com>

Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>

> ---
>   drivers/cpufreq/amd-pstate.c | 11 ++++-------
>   1 file changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index 4bedfbfc18b66..3e0308f644778 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -956,13 +956,6 @@ static void amd_pstate_init_prefcore(struct amd_cpudata *cpudata)
>   	if (!amd_pstate_prefcore)
>   		return;
>   
> -	/* should use amd-hfi instead */
> -	if (cpu_feature_enabled(X86_FEATURE_AMD_WORKLOAD_CLASS) &&
> -	    IS_ENABLED(CONFIG_AMD_HFI)) {
> -		amd_pstate_prefcore = false;
> -		return;
> -	}
> -
>   	cpudata->hw_prefcore = true;
>   
>   	/* Priorities must be initialized before ITMT support can be toggled on. */
> @@ -2438,6 +2431,10 @@ static int __init amd_pstate_init(void)
>   			return ret;
>   	}
>   
> +	if (cpu_feature_enabled(X86_FEATURE_AMD_WORKLOAD_CLASS) &&
> +	    IS_ENABLED(CONFIG_AMD_HFI))
> +		amd_pstate_prefcore = false;
> +
>   	ret = amd_pstate_register_driver(cppc_state);
>   	if (ret) {
>   		pr_err("failed to register with return %d\n", ret);


  reply	other threads:[~2026-11-30 15:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 17:20 [PATCH v2 0/3] cpufreq: amd-pstate: Capacity Aware Scheduling on hybrid platforms Vishal Badole
2026-11-25 17:20 ` [PATCH v2 1/3] cpufreq: amd-pstate: Finalize prefcore before registration Vishal Badole
2026-11-30 15:38   ` Mario Limonciello [this message]
2026-11-25 17:20 ` [PATCH v2 2/3] cpufreq: amd-pstate: Set asymmetric CPU capacity on hybrid platforms Vishal Badole
2026-11-30  8:24   ` K Prateek Nayak
2026-11-30 15:40     ` Mario Limonciello
2026-11-25 17:20 ` [PATCH v2 3/3] platform/x86/amd: hfi: Stand down when amd-pstate CAS is active Vishal Badole
2026-11-30 15:39   ` Mario Limonciello

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=91c29b1a-0bbb-43bf-b839-b36b580d8f38@kernel.org \
    --to=superm1@kernel.org \
    --cc=Vishal.Badole@amd.com \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=perry.yuan@amd.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=ray.huang@amd.com \
    --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

all inboxes | Powered by JetHome®