Skip to content

Commit efb758c

Browse files
committed
cpufreq/amd-pstate: Drop actions in amd_pstate_epp_cpu_offline()
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 <[email protected]> Signed-off-by: Mario Limonciello <[email protected]>
1 parent 4e16c11 commit efb758c

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1574,14 +1574,7 @@ static int amd_pstate_epp_cpu_online(struct cpufreq_policy *policy)
15741574

15751575
static int amd_pstate_epp_cpu_offline(struct cpufreq_policy *policy)
15761576
{
1577-
struct amd_cpudata *cpudata = policy->driver_data;
1578-
union perf_cached perf = READ_ONCE(cpudata->perf);
1579-
1580-
if (cpudata->suspended)
1581-
return 0;
1582-
1583-
return amd_pstate_update_perf(policy, perf.lowest_perf, 0, perf.lowest_perf,
1584-
AMD_CPPC_EPP_BALANCE_POWERSAVE, false);
1577+
return 0;
15851578
}
15861579

15871580
static int amd_pstate_epp_suspend(struct cpufreq_policy *policy)

0 commit comments

Comments
 (0)