@@ -306,7 +306,7 @@ static int amd_pstate_set_energy_pref_index(struct amd_cpudata *cpudata,
306
306
return ret ;
307
307
}
308
308
309
- static inline int msr_enable (bool enable )
309
+ static inline int msr_cppc_enable (bool enable )
310
310
{
311
311
int ret , cpu ;
312
312
unsigned long logical_proc_id_mask = 0 ;
@@ -332,7 +332,7 @@ static inline int msr_enable(bool enable)
332
332
return 0 ;
333
333
}
334
334
335
- static int shmem_enable (bool enable )
335
+ static int shmem_cppc_enable (bool enable )
336
336
{
337
337
int cpu , ret = 0 ;
338
338
struct cppc_perf_ctrls perf_ctrls ;
@@ -359,11 +359,11 @@ static int shmem_enable(bool enable)
359
359
return ret ;
360
360
}
361
361
362
- DEFINE_STATIC_CALL (amd_pstate_enable , msr_enable );
362
+ DEFINE_STATIC_CALL (amd_pstate_cppc_enable , msr_cppc_enable );
363
363
364
- static inline int amd_pstate_enable (bool enable )
364
+ static inline int amd_pstate_cppc_enable (bool enable )
365
365
{
366
- return static_call (amd_pstate_enable )(enable );
366
+ return static_call (amd_pstate_cppc_enable )(enable );
367
367
}
368
368
369
369
static int msr_init_perf (struct amd_cpudata * cpudata )
@@ -1042,7 +1042,7 @@ static int amd_pstate_cpu_resume(struct cpufreq_policy *policy)
1042
1042
{
1043
1043
int ret ;
1044
1044
1045
- ret = amd_pstate_enable (true);
1045
+ ret = amd_pstate_cppc_enable (true);
1046
1046
if (ret )
1047
1047
pr_err ("failed to enable amd-pstate during resume, return %d\n" , ret );
1048
1048
@@ -1053,7 +1053,7 @@ static int amd_pstate_cpu_suspend(struct cpufreq_policy *policy)
1053
1053
{
1054
1054
int ret ;
1055
1055
1056
- ret = amd_pstate_enable (false);
1056
+ ret = amd_pstate_cppc_enable (false);
1057
1057
if (ret )
1058
1058
pr_err ("failed to disable amd-pstate during suspend, return %d\n" , ret );
1059
1059
@@ -1186,7 +1186,7 @@ static ssize_t show_energy_performance_preference(
1186
1186
1187
1187
static void amd_pstate_driver_cleanup (void )
1188
1188
{
1189
- amd_pstate_enable (false);
1189
+ amd_pstate_cppc_enable (false);
1190
1190
cppc_state = AMD_PSTATE_DISABLE ;
1191
1191
current_pstate_driver = NULL ;
1192
1192
}
@@ -1220,7 +1220,7 @@ static int amd_pstate_register_driver(int mode)
1220
1220
1221
1221
cppc_state = mode ;
1222
1222
1223
- ret = amd_pstate_enable (true);
1223
+ ret = amd_pstate_cppc_enable (true);
1224
1224
if (ret ) {
1225
1225
pr_err ("failed to enable cppc during amd-pstate driver registration, return %d\n" ,
1226
1226
ret );
@@ -1599,7 +1599,7 @@ static void amd_pstate_epp_reenable(struct amd_cpudata *cpudata)
1599
1599
u64 value , max_perf ;
1600
1600
int ret ;
1601
1601
1602
- ret = amd_pstate_enable (true);
1602
+ ret = amd_pstate_cppc_enable (true);
1603
1603
if (ret )
1604
1604
pr_err ("failed to enable amd pstate during resume, return %d\n" , ret );
1605
1605
@@ -1686,7 +1686,7 @@ static int amd_pstate_epp_suspend(struct cpufreq_policy *policy)
1686
1686
cpudata -> suspended = true;
1687
1687
1688
1688
/* disable CPPC in lowlevel firmware */
1689
- ret = amd_pstate_enable (false);
1689
+ ret = amd_pstate_cppc_enable (false);
1690
1690
if (ret )
1691
1691
pr_err ("failed to suspend, return %d\n" , ret );
1692
1692
@@ -1861,7 +1861,7 @@ static int __init amd_pstate_init(void)
1861
1861
current_pstate_driver -> adjust_perf = amd_pstate_adjust_perf ;
1862
1862
} else {
1863
1863
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 );
1865
1865
static_call_update (amd_pstate_init_perf , shmem_init_perf );
1866
1866
static_call_update (amd_pstate_update_perf , shmem_update_perf );
1867
1867
}
@@ -1886,7 +1886,7 @@ static int __init amd_pstate_init(void)
1886
1886
1887
1887
global_attr_free :
1888
1888
cpufreq_unregister_driver (current_pstate_driver );
1889
- amd_pstate_enable (false);
1889
+ amd_pstate_cppc_enable (false);
1890
1890
return ret ;
1891
1891
}
1892
1892
device_initcall (amd_pstate_init );
0 commit comments