]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
cpufreq/amd-pstate: Loosen requirement on lowest nonlinear frequency != min freq
authorMario Limonciello <mario.limonciello@amd.com>
Wed, 15 Jul 2026 17:43:18 +0000 (12:43 -0500)
committerMario Limonciello <superm1@kernel.org>
Wed, 22 Jul 2026 18:45:22 +0000 (13:45 -0500)
This requirement was introduced by commit 8f8b42c1fcc93 ("cpufreq:
amd-pstate: optimize the initial frequency values verification")
specifically to aid in debugging BIOS issues with invalid _CPC tables
on some older systems.

This requirement is too tight for new systems though as some systems
actually have lowest nonlinear frequency identical to minimum
frequency.  Allow that combo to work.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: K Prateek Nayak <kprateek.nayak@amd.com>
Tested-by: K Prateek Nayak <kprateek.nayak@amd.com>
Link: https://lore.kernel.org/r/20260715174318.18235-1-mario.limonciello@amd.com
Signed-off-by: Mario Limonciello <superm1@kernel.org>
drivers/cpufreq/amd-pstate.c

index a74a4cf99d22e8c8ecb71ccb960654ec939e80a6..3d72337a3336914d922d8e908d5e2ac0d34d4b7b 100644 (file)
@@ -1031,7 +1031,7 @@ static int amd_pstate_init_freq(struct amd_cpudata *cpudata)
                return -EINVAL;
        }
 
-       if (lowest_nonlinear_freq <= min_freq || lowest_nonlinear_freq > nominal_freq) {
+       if (lowest_nonlinear_freq < min_freq || lowest_nonlinear_freq > nominal_freq) {
                pr_err("lowest_nonlinear_freq(%d) value is out of range [min_freq(%d), nominal_freq(%d)]\n",
                        lowest_nonlinear_freq, min_freq, nominal_freq);
                return -EINVAL;