[PATCH AUTOSEL 6.18] cpufreq/amd-pstate: Loosen requirement on lowest nonlinear frequency != min freq

From: Sasha Levin

Date: Mon Aug 31 2026 - 10:13:10 EST


From: Mario Limonciello <mario.limonciello@xxxxxxx>

[ Upstream commit 6842427bf2990271c771081f11fd8fab17f86c82 ]

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@xxxxxxx>
Reviewed-by: K Prateek Nayak <kprateek.nayak@xxxxxxx>
Tested-by: K Prateek Nayak <kprateek.nayak@xxxxxxx>
Link: https://lore.kernel.org/r/20260715174318.18235-1-mario.limonciello@xxxxxxx
Signed-off-by: Mario Limonciello <superm1@xxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---

LLM Generated explanations, may be completely bogus:

**Verdict for Linux 6.18.y: YES**

The amd-pstate patch is a one-line fix (`<=` → `<`) in
`amd_pstate_init_freq()`. The strict check from `8f8b42c1fcc93` (June
2024, present since v6.11) rejects valid ACPI `_CPC` tables where
`lowest_nonlinear_freq == min_freq`, so the driver fails to probe on
some newer AMD systems. The fix matches the existing comment that
documents the inclusive range `[min_freq, nominal_freq]`, is
reviewed/tested by AMD, and should apply cleanly to 6.18.44.

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 ce6d6b3ff58a3..46086a9053044 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -951,7 +951,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;
--
2.53.0