Skip to content

Commit d3dec5b

Browse files
Meng Livireshk
authored andcommitted
cpufreq: amd-pstate-ut: Modify the function to get the highest_perf value
The previous function amd_get_highest_perf() will be deprecated. It can only return 166 or 255 by cpuinfo. For platforms that support preferred core, the value of highest perf can be between 166 and 255. Therefore, it will cause amd-pstate-ut to fail when run amd_pstate_ut_check_perf(). Signed-off-by: Meng Li <li.meng@amd.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent 216710a commit d3dec5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/cpufreq/amd-pstate-ut.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,6 @@ static void amd_pstate_ut_check_perf(u32 index)
145145
struct cpufreq_policy *policy = NULL;
146146
struct amd_cpudata *cpudata = NULL;
147147

148-
highest_perf = amd_get_highest_perf();
149-
150148
for_each_possible_cpu(cpu) {
151149
policy = cpufreq_cpu_get(cpu);
152150
if (!policy)
@@ -161,6 +159,7 @@ static void amd_pstate_ut_check_perf(u32 index)
161159
return;
162160
}
163161

162+
highest_perf = cppc_perf.highest_perf;
164163
nominal_perf = cppc_perf.nominal_perf;
165164
lowest_nonlinear_perf = cppc_perf.lowest_nonlinear_perf;
166165
lowest_perf = cppc_perf.lowest_perf;
@@ -172,6 +171,7 @@ static void amd_pstate_ut_check_perf(u32 index)
172171
return;
173172
}
174173

174+
highest_perf = AMD_CPPC_HIGHEST_PERF(cap1);
175175
nominal_perf = AMD_CPPC_NOMINAL_PERF(cap1);
176176
lowest_nonlinear_perf = AMD_CPPC_LOWNONLIN_PERF(cap1);
177177
lowest_perf = AMD_CPPC_LOWEST_PERF(cap1);

0 commit comments

Comments
 (0)