This is a note to let you know that I've just added the patch titled cpufreq/amd-pstate: Call cppc_set_epp_perf in the reenable function to the 6.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: cpufreq-amd-pstate-call-cppc_set_epp_perf-in-the-ree.patch and it can be found in the queue-6.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 4de4224d57ce3204800eb03d8d2036e2e3c9ccf0 Author: Dhananjay Ugwekar <Dhananjay.Ugwekar@xxxxxxx> Date: Wed Oct 23 10:21:10 2024 +0000 cpufreq/amd-pstate: Call cppc_set_epp_perf in the reenable function [ Upstream commit 796ff50e127af8362035f87ba29b6b84e2dd9742 ] The EPP value being set in perf_ctrls.energy_perf is not being propagated to the shared memory, fix that. Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@xxxxxxx> Reviewed-by: Mario Limonciello <mario.limonciello@xxxxxxx> Reviewed-by: Perry Yuan <perry.yuan@xxxxxxx> Reviewed-by: Gautham R. Shenoy <gautham.shenoy@xxxxxxx> Link: https://lore.kernel.org/r/20241023102108.5980-4-Dhananjay.Ugwekar@xxxxxxx Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx> Stable-dep-of: 3ace20038e19 ("cpufreq/amd-pstate: Fix cpufreq_policy ref counting") Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index 91d3c3b1c2d3b..161334937090c 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -1594,8 +1594,9 @@ static void amd_pstate_epp_reenable(struct amd_cpudata *cpudata) wrmsrl_on_cpu(cpudata->cpu, MSR_AMD_CPPC_REQ, value); } else { perf_ctrls.max_perf = max_perf; - perf_ctrls.energy_perf = AMD_CPPC_ENERGY_PERF_PREF(cpudata->epp_cached); cppc_set_perf(cpudata->cpu, &perf_ctrls); + perf_ctrls.energy_perf = AMD_CPPC_ENERGY_PERF_PREF(cpudata->epp_cached); + cppc_set_epp_perf(cpudata->cpu, &perf_ctrls, 1); } } @@ -1636,8 +1637,9 @@ static void amd_pstate_epp_offline(struct cpufreq_policy *policy) } else { perf_ctrls.desired_perf = 0; perf_ctrls.max_perf = min_perf; - perf_ctrls.energy_perf = AMD_CPPC_ENERGY_PERF_PREF(HWP_EPP_BALANCE_POWERSAVE); cppc_set_perf(cpudata->cpu, &perf_ctrls); + perf_ctrls.energy_perf = AMD_CPPC_ENERGY_PERF_PREF(HWP_EPP_BALANCE_POWERSAVE); + cppc_set_epp_perf(cpudata->cpu, &perf_ctrls, 1); } mutex_unlock(&amd_pstate_limits_lock); }