Skip to content

Commit f458cf7

Browse files
committed
cpufreq/amd-pstate: Drop cppc_cap1_cached
The `cppc_cap1_cached` variable isn't used at all, there is no need to read it at initialization for each CPU. Reviewed-by: Gautham R. Shenoy <[email protected]> Reviewed-by: Dhananjay Ugwekar <[email protected]> Signed-off-by: Mario Limonciello <[email protected]>
1 parent 6f0b13f commit f458cf7

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,11 +1508,6 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy)
15081508
if (ret)
15091509
return ret;
15101510
WRITE_ONCE(cpudata->cppc_req_cached, value);
1511-
1512-
ret = rdmsrl_on_cpu(cpudata->cpu, MSR_AMD_CPPC_CAP1, &value);
1513-
if (ret)
1514-
return ret;
1515-
WRITE_ONCE(cpudata->cppc_cap1_cached, value);
15161511
}
15171512
ret = amd_pstate_set_epp(cpudata, cpudata->epp_default);
15181513
if (ret)

drivers/cpufreq/amd-pstate.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ struct amd_aperf_mperf {
7676
* AMD P-State driver supports preferred core featue.
7777
* @epp_cached: Cached CPPC energy-performance preference value
7878
* @policy: Cpufreq policy value
79-
* @cppc_cap1_cached Cached MSR_AMD_CPPC_CAP1 register value
8079
*
8180
* The amd_cpudata is key private data for each CPU thread in AMD P-State, and
8281
* represents all the attributes and goals that AMD P-State requests at runtime.
@@ -105,7 +104,6 @@ struct amd_cpudata {
105104
/* EPP feature related attributes*/
106105
u8 epp_cached;
107106
u32 policy;
108-
u64 cppc_cap1_cached;
109107
bool suspended;
110108
u8 epp_default;
111109
};

0 commit comments

Comments
 (0)