[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250218190822.1039982-11-superm1@kernel.org>
Date: Tue, 18 Feb 2025 13:08:19 -0600
From: Mario Limonciello <superm1@...nel.org>
To: Hans de Goede <hdegoede@...hat.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc: Mario Limonciello <mario.limonciello@....com>,
Perry Yuan <perry.yuan@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
x86@...nel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)),
"H . Peter Anvin" <hpa@...or.com>,
Jonathan Corbet <corbet@....net>,
Huang Rui <ray.huang@....com>,
"Gautham R . Shenoy" <gautham.shenoy@....com>,
"Rafael J . Wysocki" <rafael@...nel.org>,
Viresh Kumar <viresh.kumar@...aro.org>,
platform-driver-x86@...r.kernel.org (open list:AMD HETERO CORE HARDWARE FEEDBACK DRIVER),
linux-kernel@...r.kernel.org (open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)),
linux-doc@...r.kernel.org (open list:DOCUMENTATION),
linux-pm@...r.kernel.org (open list:AMD PSTATE DRIVER)
Subject: [PATCH v8 10/13] cpufreq/amd-pstate: Disable preferred cores on designs with workload classification
From: Mario Limonciello <mario.limonciello@....com>
On designs that have workload classification, it's preferred that
the amd-hfi driver is used to provide hints to the scheduler of
which cores to use instead of the amd-pstate driver.
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@....com>
Reviewed-by: Perry Yuan <perry.yuan@....com>
Signed-off-by: Mario Limonciello <mario.limonciello@....com>
---
drivers/cpufreq/amd-pstate.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index 08ae480768120..f425fb7ec77d7 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -806,6 +806,12 @@ static void amd_pstate_init_prefcore(struct amd_cpudata *cpudata)
/* user disabled or not detected */
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;
--
2.43.0
Powered by blists - more mailing lists