Skip to content

Commit 9983a9c

Browse files
committed
cpufreq/amd-pstate-ut: Don't check for highest perf matching on prefcore
If a system is using preferred cores the highest perf will be inconsistent as it can change from system events. Skip the checks for it. Fixes: e571a5e ("cpufreq: amd-pstate: Update amd-pstate preferred core ranking dynamically") Reviewed-by: Gautham R. Shenoy <[email protected]> Signed-off-by: Mario Limonciello <[email protected]>
1 parent 0d8584d commit 9983a9c

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

drivers/cpufreq/amd-pstate-ut.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,17 @@ static void amd_pstate_ut_check_perf(u32 index)
160160
lowest_perf = AMD_CPPC_LOWEST_PERF(cap1);
161161
}
162162

163-
if ((highest_perf != READ_ONCE(cpudata->highest_perf)) ||
164-
(nominal_perf != READ_ONCE(cpudata->nominal_perf)) ||
163+
if (highest_perf != READ_ONCE(cpudata->highest_perf) && !cpudata->hw_prefcore) {
164+
pr_err("%s cpu%d highest=%d %d highest perf doesn't match\n",
165+
__func__, cpu, highest_perf, cpudata->highest_perf);
166+
goto skip_test;
167+
}
168+
if ((nominal_perf != READ_ONCE(cpudata->nominal_perf)) ||
165169
(lowest_nonlinear_perf != READ_ONCE(cpudata->lowest_nonlinear_perf)) ||
166170
(lowest_perf != READ_ONCE(cpudata->lowest_perf))) {
167171
amd_pstate_ut_cases[index].result = AMD_PSTATE_UT_RESULT_FAIL;
168-
pr_err("%s cpu%d highest=%d %d nominal=%d %d lowest_nonlinear=%d %d lowest=%d %d, they should be equal!\n",
169-
__func__, cpu, highest_perf, cpudata->highest_perf,
170-
nominal_perf, cpudata->nominal_perf,
172+
pr_err("%s cpu%d nominal=%d %d lowest_nonlinear=%d %d lowest=%d %d, they should be equal!\n",
173+
__func__, cpu, nominal_perf, cpudata->nominal_perf,
171174
lowest_nonlinear_perf, cpudata->lowest_nonlinear_perf,
172175
lowest_perf, cpudata->lowest_perf);
173176
goto skip_test;

0 commit comments

Comments
 (0)