@@ -1179,16 +1179,16 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)
1179
1179
return ret_val ;
1180
1180
}
1181
1181
1182
- static int cppc_get_perf (int cpunum , enum cppc_regs reg_idx , u64 * perf )
1182
+ static int cppc_get_reg_val (int cpu , enum cppc_regs reg_idx , u64 * val )
1183
1183
{
1184
- struct cpc_desc * cpc_desc = per_cpu (cpc_desc_ptr , cpunum );
1184
+ struct cpc_desc * cpc_desc = per_cpu (cpc_desc_ptr , cpu );
1185
1185
struct cpc_register_resource * reg ;
1186
1186
1187
- if (perf == NULL )
1187
+ if (val == NULL )
1188
1188
return - EINVAL ;
1189
1189
1190
1190
if (!cpc_desc ) {
1191
- pr_debug ("No CPC descriptor for CPU:%d\n" , cpunum );
1191
+ pr_debug ("No CPC descriptor for CPU:%d\n" , cpu );
1192
1192
return - ENODEV ;
1193
1193
}
1194
1194
@@ -1202,7 +1202,7 @@ static int cppc_get_perf(int cpunum, enum cppc_regs reg_idx, u64 *perf)
1202
1202
}
1203
1203
1204
1204
if (CPC_IN_PCC (reg )) {
1205
- int pcc_ss_id = per_cpu (cpu_pcc_subspace_idx , cpunum );
1205
+ int pcc_ss_id = per_cpu (cpu_pcc_subspace_idx , cpu );
1206
1206
struct cppc_pcc_data * pcc_ss_data = NULL ;
1207
1207
int ret ;
1208
1208
@@ -1216,7 +1216,7 @@ static int cppc_get_perf(int cpunum, enum cppc_regs reg_idx, u64 *perf)
1216
1216
down_write (& pcc_ss_data -> pcc_lock );
1217
1217
1218
1218
if (send_pcc_cmd (pcc_ss_id , CMD_READ ) >= 0 )
1219
- ret = cpc_read (cpunum , reg , perf );
1219
+ ret = cpc_read (cpu , reg , val );
1220
1220
else
1221
1221
ret = - EIO ;
1222
1222
@@ -1225,7 +1225,7 @@ static int cppc_get_perf(int cpunum, enum cppc_regs reg_idx, u64 *perf)
1225
1225
return ret ;
1226
1226
}
1227
1227
1228
- return cpc_read (cpunum , reg , perf );
1228
+ return cpc_read (cpu , reg , val );
1229
1229
}
1230
1230
1231
1231
/**
@@ -1237,7 +1237,7 @@ static int cppc_get_perf(int cpunum, enum cppc_regs reg_idx, u64 *perf)
1237
1237
*/
1238
1238
int cppc_get_desired_perf (int cpunum , u64 * desired_perf )
1239
1239
{
1240
- return cppc_get_perf (cpunum , DESIRED_PERF , desired_perf );
1240
+ return cppc_get_reg_val (cpunum , DESIRED_PERF , desired_perf );
1241
1241
}
1242
1242
EXPORT_SYMBOL_GPL (cppc_get_desired_perf );
1243
1243
@@ -1250,7 +1250,7 @@ EXPORT_SYMBOL_GPL(cppc_get_desired_perf);
1250
1250
*/
1251
1251
int cppc_get_nominal_perf (int cpunum , u64 * nominal_perf )
1252
1252
{
1253
- return cppc_get_perf (cpunum , NOMINAL_PERF , nominal_perf );
1253
+ return cppc_get_reg_val (cpunum , NOMINAL_PERF , nominal_perf );
1254
1254
}
1255
1255
1256
1256
/**
@@ -1262,7 +1262,7 @@ int cppc_get_nominal_perf(int cpunum, u64 *nominal_perf)
1262
1262
*/
1263
1263
int cppc_get_highest_perf (int cpunum , u64 * highest_perf )
1264
1264
{
1265
- return cppc_get_perf (cpunum , HIGHEST_PERF , highest_perf );
1265
+ return cppc_get_reg_val (cpunum , HIGHEST_PERF , highest_perf );
1266
1266
}
1267
1267
EXPORT_SYMBOL_GPL (cppc_get_highest_perf );
1268
1268
@@ -1275,7 +1275,7 @@ EXPORT_SYMBOL_GPL(cppc_get_highest_perf);
1275
1275
*/
1276
1276
int cppc_get_epp_perf (int cpunum , u64 * epp_perf )
1277
1277
{
1278
- return cppc_get_perf (cpunum , ENERGY_PERF , epp_perf );
1278
+ return cppc_get_reg_val (cpunum , ENERGY_PERF , epp_perf );
1279
1279
}
1280
1280
EXPORT_SYMBOL_GPL (cppc_get_epp_perf );
1281
1281
0 commit comments