Skip to content

Commit 1bfe6a5

Browse files
dhananjay-AMDsuperm1
authored andcommitted
cpufreq/amd-pstate: Rename MSR and shared memory specific functions
Existing function names "cppc_*" and "pstate_*" for shared memory and MSR based systems are not intuitive enough, replace them with "shmem_*" and "msr_*" respectively. Signed-off-by: Dhananjay Ugwekar <[email protected]> Reviewed-by: Mario Limonciello <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mario Limonciello <[email protected]>
1 parent a9dedaa commit 1bfe6a5

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ static int amd_pstate_get_energy_pref_index(struct amd_cpudata *cpudata)
233233
return index;
234234
}
235235

236-
static void pstate_update_perf(struct amd_cpudata *cpudata, u32 min_perf,
236+
static void msr_update_perf(struct amd_cpudata *cpudata, u32 min_perf,
237237
u32 des_perf, u32 max_perf, bool fast_switch)
238238
{
239239
if (fast_switch)
@@ -243,7 +243,7 @@ static void pstate_update_perf(struct amd_cpudata *cpudata, u32 min_perf,
243243
READ_ONCE(cpudata->cppc_req_cached));
244244
}
245245

246-
DEFINE_STATIC_CALL(amd_pstate_update_perf, pstate_update_perf);
246+
DEFINE_STATIC_CALL(amd_pstate_update_perf, msr_update_perf);
247247

248248
static inline void amd_pstate_update_perf(struct amd_cpudata *cpudata,
249249
u32 min_perf, u32 des_perf,
@@ -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 pstate_enable(bool enable)
309+
static inline int msr_enable(bool enable)
310310
{
311311
int ret, cpu;
312312
unsigned long logical_proc_id_mask = 0;
@@ -332,7 +332,7 @@ static inline int pstate_enable(bool enable)
332332
return 0;
333333
}
334334

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

362-
DEFINE_STATIC_CALL(amd_pstate_enable, pstate_enable);
362+
DEFINE_STATIC_CALL(amd_pstate_enable, msr_enable);
363363

364364
static inline int amd_pstate_enable(bool enable)
365365
{
366366
return static_call(amd_pstate_enable)(enable);
367367
}
368368

369-
static int pstate_init_perf(struct amd_cpudata *cpudata)
369+
static int msr_init_perf(struct amd_cpudata *cpudata)
370370
{
371371
u64 cap1;
372372

@@ -385,7 +385,7 @@ static int pstate_init_perf(struct amd_cpudata *cpudata)
385385
return 0;
386386
}
387387

388-
static int cppc_init_perf(struct amd_cpudata *cpudata)
388+
static int shmem_init_perf(struct amd_cpudata *cpudata)
389389
{
390390
struct cppc_perf_caps cppc_perf;
391391

@@ -420,14 +420,14 @@ static int cppc_init_perf(struct amd_cpudata *cpudata)
420420
return ret;
421421
}
422422

423-
DEFINE_STATIC_CALL(amd_pstate_init_perf, pstate_init_perf);
423+
DEFINE_STATIC_CALL(amd_pstate_init_perf, msr_init_perf);
424424

425425
static inline int amd_pstate_init_perf(struct amd_cpudata *cpudata)
426426
{
427427
return static_call(amd_pstate_init_perf)(cpudata);
428428
}
429429

430-
static void cppc_update_perf(struct amd_cpudata *cpudata,
430+
static void shmem_update_perf(struct amd_cpudata *cpudata,
431431
u32 min_perf, u32 des_perf,
432432
u32 max_perf, bool fast_switch)
433433
{
@@ -1897,9 +1897,9 @@ static int __init amd_pstate_init(void)
18971897
current_pstate_driver->adjust_perf = amd_pstate_adjust_perf;
18981898
} else {
18991899
pr_debug("AMD CPPC shared memory based functionality is supported\n");
1900-
static_call_update(amd_pstate_enable, cppc_enable);
1901-
static_call_update(amd_pstate_init_perf, cppc_init_perf);
1902-
static_call_update(amd_pstate_update_perf, cppc_update_perf);
1900+
static_call_update(amd_pstate_enable, shmem_enable);
1901+
static_call_update(amd_pstate_init_perf, shmem_init_perf);
1902+
static_call_update(amd_pstate_update_perf, shmem_update_perf);
19031903
}
19041904

19051905
if (amd_pstate_prefcore) {

0 commit comments

Comments
 (0)