Skip to content

Commit 0ffe26c

Browse files
superm1opsiff
authored andcommitted
cpufreq/amd-pstate-ut: Don't check for highest perf matching on prefcore
mainline inclusion from mainline-v6.11-rc6 category: bugfix 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 <gautham.shenoy@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> (cherry picked from commit 9983a9c) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 6e92bbb commit 0ffe26c

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

drivers/cpufreq/amd-pstate-ut.c

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

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

0 commit comments

Comments
 (0)