Skip to content

Commit 3b43739

Browse files
committed
cpufreq/amd-pstate: Drop cached epp_policy variable
epp_policy is not used by any of the current code and there is no need to cache it. Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com> Link: https://lore.kernel.org/r/20241209185248.16301-6-mario.limonciello@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
1 parent 6c093d5 commit 3b43739

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,7 +1478,6 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy)
14781478
return -ENOMEM;
14791479

14801480
cpudata->cpu = policy->cpu;
1481-
cpudata->epp_policy = 0;
14821481

14831482
ret = amd_pstate_init_perf(cpudata);
14841483
if (ret)
@@ -1585,8 +1584,6 @@ static int amd_pstate_epp_update_limit(struct cpufreq_policy *policy)
15851584
value &= ~AMD_CPPC_DES_PERF(~0L);
15861585
value |= AMD_CPPC_DES_PERF(0);
15871586

1588-
cpudata->epp_policy = cpudata->policy;
1589-
15901587
/* Get BIOS pre-defined epp value */
15911588
epp = amd_pstate_get_epp(cpudata, value);
15921589
if (epp < 0) {

drivers/cpufreq/amd-pstate.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ struct amd_aperf_mperf {
5757
* @hw_prefcore: check whether HW supports preferred core featue.
5858
* Only when hw_prefcore and early prefcore param are true,
5959
* AMD P-State driver supports preferred core featue.
60-
* @epp_policy: Last saved policy used to set energy-performance preference
6160
* @epp_cached: Cached CPPC energy-performance preference value
6261
* @policy: Cpufreq policy value
6362
* @cppc_cap1_cached Cached MSR_AMD_CPPC_CAP1 register value
@@ -94,7 +93,6 @@ struct amd_cpudata {
9493
bool hw_prefcore;
9594

9695
/* EPP feature related attributes*/
97-
s16 epp_policy;
9896
s16 epp_cached;
9997
u32 policy;
10098
u64 cppc_cap1_cached;

0 commit comments

Comments
 (0)