Skip to content

Commit 7fb463a

Browse files
dhananjay-AMDsuperm1
authored andcommitted
cpufreq/amd-pstate: Rename functions that enable CPPC
Explicitly rename functions that enable CPPC as *_cppc_*. Signed-off-by: Dhananjay Ugwekar <[email protected]> Reviewed-by: Mario Limonciello <[email protected]> Reviewed-by: Perry Yuan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mario Limonciello <[email protected]>
1 parent 31f9056 commit 7fb463a

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ static int amd_pstate_set_energy_pref_index(struct amd_cpudata *cpudata,
306306
return ret;
307307
}
308308

309-
static inline int msr_enable(bool enable)
309+
static inline int msr_cppc_enable(bool enable)
310310
{
311311
int ret, cpu;
312312
unsigned long logical_proc_id_mask = 0;
@@ -332,7 +332,7 @@ static inline int msr_enable(bool enable)
332332
return 0;
333333
}
334334

335-
static int shmem_enable(bool enable)
335+
static int shmem_cppc_enable(bool enable)
336336
{
337337
int cpu, ret = 0;
338338
struct cppc_perf_ctrls perf_ctrls;
@@ -359,11 +359,11 @@ static int shmem_enable(bool enable)
359359
return ret;
360360
}
361361

362-
DEFINE_STATIC_CALL(amd_pstate_enable, msr_enable);
362+
DEFINE_STATIC_CALL(amd_pstate_cppc_enable, msr_cppc_enable);
363363

364-
static inline int amd_pstate_enable(bool enable)
364+
static inline int amd_pstate_cppc_enable(bool enable)
365365
{
366-
return static_call(amd_pstate_enable)(enable);
366+
return static_call(amd_pstate_cppc_enable)(enable);
367367
}
368368

369369
static int msr_init_perf(struct amd_cpudata *cpudata)
@@ -1042,7 +1042,7 @@ static int amd_pstate_cpu_resume(struct cpufreq_policy *policy)
10421042
{
10431043
int ret;
10441044

1045-
ret = amd_pstate_enable(true);
1045+
ret = amd_pstate_cppc_enable(true);
10461046
if (ret)
10471047
pr_err("failed to enable amd-pstate during resume, return %d\n", ret);
10481048

@@ -1053,7 +1053,7 @@ static int amd_pstate_cpu_suspend(struct cpufreq_policy *policy)
10531053
{
10541054
int ret;
10551055

1056-
ret = amd_pstate_enable(false);
1056+
ret = amd_pstate_cppc_enable(false);
10571057
if (ret)
10581058
pr_err("failed to disable amd-pstate during suspend, return %d\n", ret);
10591059

@@ -1186,7 +1186,7 @@ static ssize_t show_energy_performance_preference(
11861186

11871187
static void amd_pstate_driver_cleanup(void)
11881188
{
1189-
amd_pstate_enable(false);
1189+
amd_pstate_cppc_enable(false);
11901190
cppc_state = AMD_PSTATE_DISABLE;
11911191
current_pstate_driver = NULL;
11921192
}
@@ -1220,7 +1220,7 @@ static int amd_pstate_register_driver(int mode)
12201220

12211221
cppc_state = mode;
12221222

1223-
ret = amd_pstate_enable(true);
1223+
ret = amd_pstate_cppc_enable(true);
12241224
if (ret) {
12251225
pr_err("failed to enable cppc during amd-pstate driver registration, return %d\n",
12261226
ret);
@@ -1599,7 +1599,7 @@ static void amd_pstate_epp_reenable(struct amd_cpudata *cpudata)
15991599
u64 value, max_perf;
16001600
int ret;
16011601

1602-
ret = amd_pstate_enable(true);
1602+
ret = amd_pstate_cppc_enable(true);
16031603
if (ret)
16041604
pr_err("failed to enable amd pstate during resume, return %d\n", ret);
16051605

@@ -1686,7 +1686,7 @@ static int amd_pstate_epp_suspend(struct cpufreq_policy *policy)
16861686
cpudata->suspended = true;
16871687

16881688
/* disable CPPC in lowlevel firmware */
1689-
ret = amd_pstate_enable(false);
1689+
ret = amd_pstate_cppc_enable(false);
16901690
if (ret)
16911691
pr_err("failed to suspend, return %d\n", ret);
16921692

@@ -1861,7 +1861,7 @@ static int __init amd_pstate_init(void)
18611861
current_pstate_driver->adjust_perf = amd_pstate_adjust_perf;
18621862
} else {
18631863
pr_debug("AMD CPPC shared memory based functionality is supported\n");
1864-
static_call_update(amd_pstate_enable, shmem_enable);
1864+
static_call_update(amd_pstate_cppc_enable, shmem_cppc_enable);
18651865
static_call_update(amd_pstate_init_perf, shmem_init_perf);
18661866
static_call_update(amd_pstate_update_perf, shmem_update_perf);
18671867
}
@@ -1886,7 +1886,7 @@ static int __init amd_pstate_init(void)
18861886

18871887
global_attr_free:
18881888
cpufreq_unregister_driver(current_pstate_driver);
1889-
amd_pstate_enable(false);
1889+
amd_pstate_cppc_enable(false);
18901890
return ret;
18911891
}
18921892
device_initcall(amd_pstate_init);

0 commit comments

Comments
 (0)