This is a note to let you know that I've just added the patch titled cpufreq/amd-pstate: Remove the cppc_state check in offline/online functions to the 6.13-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-remove-the-cppc_state-check-in-of.patch and it can be found in the queue-6.13 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit eade9503c75c97b700b9390297f5d49552e426fb Author: Dhananjay Ugwekar <Dhananjay.Ugwekar@xxxxxxx> Date: Wed Dec 4 14:48:41 2024 +0000 cpufreq/amd-pstate: Remove the cppc_state check in offline/online functions [ Upstream commit b78f8c87ec3e7499bb049986838636d3afbc7ece ] Only amd_pstate_epp driver (i.e. cppc_state = ACTIVE) enters the amd_pstate_epp_offline() and amd_pstate_epp_cpu_online() functions, so remove the unnecessary if condition checking if cppc_state is equal to AMD_PSTATE_ACTIVE. Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@xxxxxxx> Reviewed-by: Mario Limonciello <mario.limonciello@xxxxxxx> Reviewed-by: Gautham R. Shenoy <gautham.shenoy@xxxxxxx> Link: https://lore.kernel.org/r/20241204144842.164178-5-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 72c613cba7086..e798420bcb5f9 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -1624,10 +1624,8 @@ static int amd_pstate_epp_cpu_online(struct cpufreq_policy *policy) pr_debug("AMD CPU Core %d going online\n", cpudata->cpu); - if (cppc_state == AMD_PSTATE_ACTIVE) { - amd_pstate_epp_reenable(cpudata); - cpudata->suspended = false; - } + amd_pstate_epp_reenable(cpudata); + cpudata->suspended = false; return 0; } @@ -1656,8 +1654,7 @@ static int amd_pstate_epp_cpu_offline(struct cpufreq_policy *policy) if (cpudata->suspended) return 0; - if (cppc_state == AMD_PSTATE_ACTIVE) - amd_pstate_epp_offline(policy); + amd_pstate_epp_offline(policy); return 0; }