122 lines
3.7 KiB
Diff
122 lines
3.7 KiB
Diff
From ca32f306d11e95ca133a2f90249bb4555c2742c3 Mon Sep 17 00:00:00 2001
|
|
From: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
|
|
Date: Wed, 23 Oct 2024 10:21:06 +0000
|
|
Subject: cpufreq/amd-pstate: Rename functions that enable CPPC
|
|
|
|
Explicitly rename functions that enable CPPC as *_cppc_*.
|
|
|
|
Signed-off-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@amd.com>
|
|
Reviewed-by: Perry Yuan <perry.yuan@amd.com>
|
|
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
|
|
---
|
|
drivers/cpufreq/amd-pstate.c | 26 +++++++++++++-------------
|
|
1 file changed, 13 insertions(+), 13 deletions(-)
|
|
|
|
--- a/drivers/cpufreq/amd-pstate.c
|
|
+++ b/drivers/cpufreq/amd-pstate.c
|
|
@@ -336,7 +336,7 @@ static int amd_pstate_set_energy_pref_in
|
|
return ret;
|
|
}
|
|
|
|
-static inline int msr_enable(bool enable)
|
|
+static inline int msr_cppc_enable(bool enable)
|
|
{
|
|
int ret, cpu;
|
|
unsigned long logical_proc_id_mask = 0;
|
|
@@ -362,7 +362,7 @@ static inline int msr_enable(bool enable
|
|
return 0;
|
|
}
|
|
|
|
-static int shmem_enable(bool enable)
|
|
+static int shmem_cppc_enable(bool enable)
|
|
{
|
|
int cpu, ret = 0;
|
|
struct cppc_perf_ctrls perf_ctrls;
|
|
@@ -389,11 +389,11 @@ static int shmem_enable(bool enable)
|
|
return ret;
|
|
}
|
|
|
|
-DEFINE_STATIC_CALL(amd_pstate_enable, msr_enable);
|
|
+DEFINE_STATIC_CALL(amd_pstate_cppc_enable, msr_cppc_enable);
|
|
|
|
-static inline int amd_pstate_enable(bool enable)
|
|
+static inline int amd_pstate_cppc_enable(bool enable)
|
|
{
|
|
- return static_call(amd_pstate_enable)(enable);
|
|
+ return static_call(amd_pstate_cppc_enable)(enable);
|
|
}
|
|
|
|
static int msr_init_perf(struct amd_cpudata *cpudata)
|
|
@@ -1072,7 +1072,7 @@ static int amd_pstate_cpu_resume(struct
|
|
{
|
|
int ret;
|
|
|
|
- ret = amd_pstate_enable(true);
|
|
+ ret = amd_pstate_cppc_enable(true);
|
|
if (ret)
|
|
pr_err("failed to enable amd-pstate during resume, return %d\n", ret);
|
|
|
|
@@ -1083,7 +1083,7 @@ static int amd_pstate_cpu_suspend(struct
|
|
{
|
|
int ret;
|
|
|
|
- ret = amd_pstate_enable(false);
|
|
+ ret = amd_pstate_cppc_enable(false);
|
|
if (ret)
|
|
pr_err("failed to disable amd-pstate during suspend, return %d\n", ret);
|
|
|
|
@@ -1216,7 +1216,7 @@ static ssize_t show_energy_performance_p
|
|
|
|
static void amd_pstate_driver_cleanup(void)
|
|
{
|
|
- amd_pstate_enable(false);
|
|
+ amd_pstate_cppc_enable(false);
|
|
cppc_state = AMD_PSTATE_DISABLE;
|
|
current_pstate_driver = NULL;
|
|
}
|
|
@@ -1250,7 +1250,7 @@ static int amd_pstate_register_driver(in
|
|
|
|
cppc_state = mode;
|
|
|
|
- ret = amd_pstate_enable(true);
|
|
+ ret = amd_pstate_cppc_enable(true);
|
|
if (ret) {
|
|
pr_err("failed to enable cppc during amd-pstate driver registration, return %d\n",
|
|
ret);
|
|
@@ -1629,7 +1629,7 @@ static void amd_pstate_epp_reenable(stru
|
|
u64 value, max_perf;
|
|
int ret;
|
|
|
|
- ret = amd_pstate_enable(true);
|
|
+ ret = amd_pstate_cppc_enable(true);
|
|
if (ret)
|
|
pr_err("failed to enable amd pstate during resume, return %d\n", ret);
|
|
|
|
@@ -1716,7 +1716,7 @@ static int amd_pstate_epp_suspend(struct
|
|
cpudata->suspended = true;
|
|
|
|
/* disable CPPC in lowlevel firmware */
|
|
- ret = amd_pstate_enable(false);
|
|
+ ret = amd_pstate_cppc_enable(false);
|
|
if (ret)
|
|
pr_err("failed to suspend, return %d\n", ret);
|
|
|
|
@@ -1891,7 +1891,7 @@ static int __init amd_pstate_init(void)
|
|
current_pstate_driver->adjust_perf = amd_pstate_adjust_perf;
|
|
} else {
|
|
pr_debug("AMD CPPC shared memory based functionality is supported\n");
|
|
- static_call_update(amd_pstate_enable, shmem_enable);
|
|
+ static_call_update(amd_pstate_cppc_enable, shmem_cppc_enable);
|
|
static_call_update(amd_pstate_init_perf, shmem_init_perf);
|
|
static_call_update(amd_pstate_update_perf, shmem_update_perf);
|
|
}
|
|
@@ -1916,7 +1916,7 @@ static int __init amd_pstate_init(void)
|
|
|
|
global_attr_free:
|
|
cpufreq_unregister_driver(current_pstate_driver);
|
|
- amd_pstate_enable(false);
|
|
+ amd_pstate_cppc_enable(false);
|
|
return ret;
|
|
}
|
|
device_initcall(amd_pstate_init);
|