From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796053118; b=QMIHVXycLeFCJKnm7HVpXOR1IPBRiFoaS1N5x7AAoONdFQST12fCPTc5X9y9zumK6aar FQQRq/cX17j3gwFqXhZcN7dBWsK8Cn/SOGCjMdbdmwbj7scqcQ0cSj+6gj1E5xrk0GO+m xyG6gG/V+ypYVJ9fhWBklYW/qCnzzT1zYP/XREYD+VBi8DDivQ8G4O+PRQhQ2sJ8YB76F 05Hx0eSjFS2TqI+dWhgUU/mVXZetjTh5yIoBVJXzhs/i+R3LOOef9BI6+f110rzzb8nG7 A7jDCaGvH2gGDuFzExNZHIDK/WxaENuX79MwGeJC2G3EHwHKWbT3nuaiJeMWDUmtkxg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796053118; h=Received:DKIM-Signature:Message-ID:Date:MIME-Version:User-Agent: Subject:Content-Language:To:References:Cc:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=T2fuVj/B2HDwSqRzRQvxDeFl7M4iQDTityfT88Po8D0=; b=C5c24mvZ9H5s9lh0Z8lk+/ZlZPcVyurpfksfvJ0lnJWJk2redb2YvFLX+NDEqHwi6zBP UY6LsLqdaS/Hn39qRkxQAfo6wYV00tkfLnThz04wzns9h8hmtaJDFcnCN5hzqzVF6Ar5e gJMZQ/VDIBWL5oYiGx2ZW2SdFbOslAZcPewujarzPxnbCU776OcvEN+nE25E8J1Kn5DBD lBsEj1lXF7JwCclphCX0aNqVldZmIgDx8Tzy++99qjpnMuUZXyDGmmdD3p3ETLR9efWAj HAcWbG6QHv2mAbkJTQkdJlSk6hi5u1txlXImENZSA29yUjPPIFl4UYUtJzuWKmqjGEg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="hv/+q01J"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 329D9606A32D; Mon, 30 Nov 2026 15:38:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=hv/+q01J Received: by smtp.kernel.org (Postfix) with ESMTPSA id 349941F00896; Mon, 30 Nov 2026 15:38:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796053118; bh=T2fuVj/B2HDwSqRzRQvxDeFl7M4iQDTityfT88Po8D0=; h=Date:Subject:To:References:Cc:From:In-Reply-To; b=hv/+q01JqpuI1NriXRTv4Z2K/bUDjtLhvKGt0iCm2gJUXOOryj6CEeSouw4iUCRP8 e/sWQ32BHQRnPfdr9D/bvm+8gTD9GEAZTesALP+85Qef6LmcxkyZmyDc3D5nCBkdHY PMtM2LbqelrSp6peTBVoJv3yzCxF/ZqjUkYWfauRLVvgeS5ck63ntlhHLf13CII5Ps COGj2iCDkpm/FV17BH7Ckv3WZijOYzXr72chB/cvhhmlMt9WTpyxy6tM7wFIUAy0JU V7Dits0Q/TAmcyg7YbY9jsiV6hu4i3UwdsWO8vHlTX7cteUGptTgGmUxAMdZhelpaZ Vk3Ms//6Oo3fg== Message-ID: <91c29b1a-0bbb-43bf-b839-b36b580d8f38@kernel.org> Date: Mon, 30 Nov 2026 09:38:35 -0600 X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/3] cpufreq: amd-pstate: Finalize prefcore before registration Content-Language: en-US To: Vishal Badole References: <20261125172031.741740-1-Vishal.Badole@amd.com> <20261125172031.741740-2-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 From: Mario Limonciello In-Reply-To: <20261125172031.741740-2-Vishal.Badole@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 Reviewed-by: Mario Limonciello (AMD) > --- > 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);