Skip to content

Commit bfea2b3

Browse files
superm1bp3tk0v
authored andcommitted
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. Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Reviewed-by: Gautham R. Shenoy <[email protected]> Reviewed-by: Perry Yuan <[email protected]> Acked-by: Ilpo Järvinen <[email protected]> Link: https://lore.kernel.org/[email protected]
1 parent 9e8f6bf commit bfea2b3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,13 @@ static void amd_pstate_init_prefcore(struct amd_cpudata *cpudata)
826826
if (!amd_pstate_prefcore)
827827
return;
828828

829+
/* should use amd-hfi instead */
830+
if (cpu_feature_enabled(X86_FEATURE_AMD_WORKLOAD_CLASS) &&
831+
IS_ENABLED(CONFIG_AMD_HFI)) {
832+
amd_pstate_prefcore = false;
833+
return;
834+
}
835+
829836
cpudata->hw_prefcore = true;
830837

831838
/* Priorities must be initialized before ITMT support can be toggled on. */

0 commit comments

Comments
 (0)