Commit 8157fbc9 authored by K Prateek Nayak's avatar K Prateek Nayak Committed by Peter Zijlstra
Browse files

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: default avatarK Prateek Nayak <kprateek.nayak@amd.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20250409053446.23367-4-kprateek.nayak@amd.com
parent 0e3f6c36
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);
		}
	}
}