]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
cpufreq/amd-pstate: Drop `cppc_cap1_cached`
authorMario Limonciello <mario.limonciello@amd.com>
Sat, 7 Dec 2024 06:28:41 +0000 (00:28 -0600)
committerMario Limonciello <mario.limonciello@amd.com>
Thu, 6 Mar 2025 19:01:25 +0000 (13:01 -0600)
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 <gautham.shenoy@amd.com>
Reviewed-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
drivers/cpufreq/amd-pstate.c
drivers/cpufreq/amd-pstate.h

index 65714d510ce35b1fcf862db1635b3d1d604a1ef6..6f1a3056bcbd941477327a77814c25eb86ac2043 100644 (file)
@@ -1508,11 +1508,6 @@ static int amd_pstate_epp_cpu_init(struct cpufreq_policy *policy)
                if (ret)
                        return ret;
                WRITE_ONCE(cpudata->cppc_req_cached, value);
-
-               ret = rdmsrl_on_cpu(cpudata->cpu, MSR_AMD_CPPC_CAP1, &value);
-               if (ret)
-                       return ret;
-               WRITE_ONCE(cpudata->cppc_cap1_cached, value);
        }
        ret = amd_pstate_set_epp(cpudata, cpudata->epp_default);
        if (ret)
index 83532a0079a81185fe3e4d0ddd29c55a456096e0..1557e1afea79cdf6d2db8d77c133b0f871568d6d 100644 (file)
@@ -76,7 +76,6 @@ struct amd_aperf_mperf {
  *               AMD P-State driver supports preferred core featue.
  * @epp_cached: Cached CPPC energy-performance preference value
  * @policy: Cpufreq policy value
- * @cppc_cap1_cached Cached MSR_AMD_CPPC_CAP1 register value
  *
  * The amd_cpudata is key private data for each CPU thread in AMD P-State, and
  * represents all the attributes and goals that AMD P-State requests at runtime.
@@ -105,7 +104,6 @@ struct amd_cpudata {
        /* EPP feature related attributes*/
        u8      epp_cached;
        u32     policy;
-       u64     cppc_cap1_cached;
        bool    suspended;
        u8      epp_default;
 };