]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
cpufreq/amd-pstate: Drop actions in amd_pstate_epp_cpu_offline()
authorMario Limonciello <mario.limonciello@amd.com>
Wed, 19 Feb 2025 20:08:14 +0000 (14:08 -0600)
committerMario Limonciello <mario.limonciello@amd.com>
Thu, 6 Mar 2025 19:01:26 +0000 (13:01 -0600)
When the CPU goes offline there is no need to change the CPPC request
because the CPU will go into the deepest C-state it supports already.

Actually changing the CPPC request when it goes offline messes up the
cached values and can lead to the wrong values being restored when
it comes back.

Instead drop the actions and if the CPU comes back online let
amd_pstate_epp_set_policy() restore it to expected values.

Reviewed-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
drivers/cpufreq/amd-pstate.c

index 8c5f4449adfa5a85b3739e7e2f89e168c90ed9a4..024d33d5e3670acfaa469030c1596aa85df2cba6 100644 (file)
@@ -1574,14 +1574,7 @@ static int amd_pstate_epp_cpu_online(struct cpufreq_policy *policy)
 
 static int amd_pstate_epp_cpu_offline(struct cpufreq_policy *policy)
 {
-       struct amd_cpudata *cpudata = policy->driver_data;
-       union perf_cached perf = READ_ONCE(cpudata->perf);
-
-       if (cpudata->suspended)
-               return 0;
-
-       return amd_pstate_update_perf(policy, perf.lowest_perf, 0, perf.lowest_perf,
-                                     AMD_CPPC_EPP_BALANCE_POWERSAVE, false);
+       return 0;
 }
 
 static int amd_pstate_epp_suspend(struct cpufreq_policy *policy)