Commit 15d75184 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge tag 'amd-pstate-v6.11-2024-08-26' of...

Merge tag 'amd-pstate-v6.11-2024-08-26' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux

Merge amd-pstate driver fixes for 6.11-rc6 from Mario Limonciello:

"amd-pstate fixes for 6.11-rc
 - Fix to unit test coverage
 - Fix bug with enabling CPPC on hetero designs
 - Fix uninitialized variable"

* tag 'amd-pstate-v6.11-2024-08-26' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/superm1/linux:
  cpufreq/amd-pstate-ut: Don't check for highest perf matching on prefcore
  cpufreq/amd-pstate: Use topology_logical_package_id() instead of logical_die_id()
  cpufreq: amd-pstate: Fix uninitialized variable in amd_pstate_cpu_boost_update()
parents 5be63fc1 9983a9cd
...@@ -160,14 +160,17 @@ static void amd_pstate_ut_check_perf(u32 index) ...@@ -160,14 +160,17 @@ static void amd_pstate_ut_check_perf(u32 index)
lowest_perf = AMD_CPPC_LOWEST_PERF(cap1); lowest_perf = AMD_CPPC_LOWEST_PERF(cap1);
} }
if ((highest_perf != READ_ONCE(cpudata->highest_perf)) || if (highest_perf != READ_ONCE(cpudata->highest_perf) && !cpudata->hw_prefcore) {
(nominal_perf != READ_ONCE(cpudata->nominal_perf)) || pr_err("%s cpu%d highest=%d %d highest perf doesn't match\n",
__func__, cpu, highest_perf, cpudata->highest_perf);
goto skip_test;
}
if ((nominal_perf != READ_ONCE(cpudata->nominal_perf)) ||
(lowest_nonlinear_perf != READ_ONCE(cpudata->lowest_nonlinear_perf)) || (lowest_nonlinear_perf != READ_ONCE(cpudata->lowest_nonlinear_perf)) ||
(lowest_perf != READ_ONCE(cpudata->lowest_perf))) { (lowest_perf != READ_ONCE(cpudata->lowest_perf))) {
amd_pstate_ut_cases[index].result = AMD_PSTATE_UT_RESULT_FAIL; amd_pstate_ut_cases[index].result = AMD_PSTATE_UT_RESULT_FAIL;
pr_err("%s cpu%d highest=%d %d nominal=%d %d lowest_nonlinear=%d %d lowest=%d %d, they should be equal!\n", pr_err("%s cpu%d nominal=%d %d lowest_nonlinear=%d %d lowest=%d %d, they should be equal!\n",
__func__, cpu, highest_perf, cpudata->highest_perf, __func__, cpu, nominal_perf, cpudata->nominal_perf,
nominal_perf, cpudata->nominal_perf,
lowest_nonlinear_perf, cpudata->lowest_nonlinear_perf, lowest_nonlinear_perf, cpudata->lowest_nonlinear_perf,
lowest_perf, cpudata->lowest_perf); lowest_perf, cpudata->lowest_perf);
goto skip_test; goto skip_test;
......
...@@ -321,7 +321,7 @@ static inline int pstate_enable(bool enable) ...@@ -321,7 +321,7 @@ static inline int pstate_enable(bool enable)
return 0; return 0;
for_each_present_cpu(cpu) { for_each_present_cpu(cpu) {
unsigned long logical_id = topology_logical_die_id(cpu); unsigned long logical_id = topology_logical_package_id(cpu);
if (test_bit(logical_id, &logical_proc_id_mask)) if (test_bit(logical_id, &logical_proc_id_mask))
continue; continue;
...@@ -692,7 +692,7 @@ static int amd_pstate_cpu_boost_update(struct cpufreq_policy *policy, bool on) ...@@ -692,7 +692,7 @@ static int amd_pstate_cpu_boost_update(struct cpufreq_policy *policy, bool on)
struct amd_cpudata *cpudata = policy->driver_data; struct amd_cpudata *cpudata = policy->driver_data;
struct cppc_perf_ctrls perf_ctrls; struct cppc_perf_ctrls perf_ctrls;
u32 highest_perf, nominal_perf, nominal_freq, max_freq; u32 highest_perf, nominal_perf, nominal_freq, max_freq;
int ret; int ret = 0;
highest_perf = READ_ONCE(cpudata->highest_perf); highest_perf = READ_ONCE(cpudata->highest_perf);
nominal_perf = READ_ONCE(cpudata->nominal_perf); nominal_perf = READ_ONCE(cpudata->nominal_perf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment