[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241104175407.19546-11-mario.limonciello@amd.com>
Date: Mon, 4 Nov 2024 11:54:05 -0600
From: Mario Limonciello <mario.limonciello@....com>
To: Borislav Petkov <bp@...en8.de>, Hans de Goede <hdegoede@...hat.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
CC: <x86@...nel.org>, "Gautham R . Shenoy" <gautham.shenoy@....com>, "Mario
Limonciello" <mario.limonciello@....com>, Perry Yuan <perry.yuan@....com>,
<linux-kernel@...r.kernel.org>, <linux-doc@...r.kernel.org>,
<linux-pm@...r.kernel.org>, <platform-driver-x86@...r.kernel.org>, "Shyam
Sundar S K" <Shyam-sundar.S-k@....com>
Subject: [PATCH v6 10/12] cpufreq/amd-pstate: Disable preferred cores on designs with workload classification
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>
---
v6:
* Use cpu_feature_enabled
---
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 32ddbf37a9f0a..84840666f1d3e 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -780,6 +780,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