From: K Prateek Nayak Date: Wed, 9 Apr 2025 05:34:45 +0000 (+0000) Subject: cpufreq/amd-pstate: Update asym_prefer_cpu when core rankings change X-Git-Tag: v6.16-rc1~197^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8157fbc907452aa5674df2de23c1c7305c907006;p=thirdparty%2Flinux.git cpufreq/amd-pstate: Update asym_prefer_cpu when core rankings change A subset of AMD systems supporting Preferred Core rankings can have their rankings changed dynamically at runtime. Update the "sg->asym_prefer_cpu" across the local hierarchy of CPU when the preferred core ranking changes. Signed-off-by: K Prateek Nayak Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mario Limonciello Link: https://lore.kernel.org/r/20250409053446.23367-4-kprateek.nayak@amd.com --- diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index 6789eed1bb5ba..8796217ccc60d 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -844,8 +844,10 @@ static void amd_pstate_update_limits(unsigned int cpu) if (highest_perf_changed) { WRITE_ONCE(cpudata->prefcore_ranking, cur_high); - if (cur_high < CPPC_MAX_PERF) + if (cur_high < CPPC_MAX_PERF) { sched_set_itmt_core_prio((int)cur_high, cpu); + sched_update_asym_prefer_cpu(cpu, prev_high, cur_high); + } } }