[SRU][N][PATCH 1/1] UBUNTU: SAUCE: Revert "Revert "cpufreq: amd-pstate: Fix the inconsistency in max frequency units""

Manuel Diewald manuel.diewald at canonical.com
Tue May 20 12:27:22 UTC 2025


BugLink: https://bugs.launchpad.net/bugs/2109609

This reverts commit d76c1093e3fcc1a50d7eeee4f7537cfc7882e7a8 which is
commit 07caf754f696cbb7037e4c0c5da5fdbbbba13364 upstream (linux-6.6.y).

The regression that the original revert addresses only affects kernels
older than 6.9.y that do not include commit ("5547c0ebfc2e cpufreq:
amd-pstate: Unify computation of
{max,min,nominal,lowest_nonlinear}_freq"). However, this commit was
picked up in a stable update [1] for noble that includes v6.9.6, so
noble is not affected by this regression. Unfortunately we later picked
up the revert commit addressing the issue found in older kernels via
another stable update [2] for noble including v6.6.37.

Revert the revert from 6.6.y again so that correct frequencies are
reported.

[1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2074091
[2] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2076435

Signed-off-by: Manuel Diewald <manuel.diewald at canonical.com>
---
 drivers/cpufreq/amd-pstate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index 6f51c5e09795..56277f4f70b5 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -718,7 +718,7 @@ static int amd_pstate_set_boost(struct cpufreq_policy *policy, int state)
 	if (state)
 		policy->cpuinfo.max_freq = cpudata->max_freq;
 	else
-		policy->cpuinfo.max_freq = cpudata->nominal_freq;
+		policy->cpuinfo.max_freq = cpudata->nominal_freq * 1000;
 
 	policy->max = policy->cpuinfo.max_freq;
 
-- 
2.34.1




More information about the kernel-team mailing list