Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH] cpufreq/amd-pstate: Loosen requirement on lowest nonlinear frequency != min freq
@ 2026-07-15 17:43 Mario Limonciello
  2026-07-21  2:51 ` K Prateek Nayak
  0 siblings, 1 reply; 2+ messages in thread
From: Mario Limonciello @ 2026-07-15 17:43 UTC (permalink / raw)
  To: K Prateek Nayak
  Cc: Perry Yuan, open list:X86 ARCHITECTURE (32-BIT AND 64-BIT),
	open list:CPU FREQUENCY SCALING FRAMEWORK, Mario Limonciello

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>
---
 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 a74a4cf99d22e..3d72337a33369 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -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;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cpufreq/amd-pstate: Loosen requirement on lowest nonlinear frequency != min freq
  2026-07-15 17:43 [PATCH] cpufreq/amd-pstate: Loosen requirement on lowest nonlinear frequency != min freq Mario Limonciello
@ 2026-07-21  2:51 ` K Prateek Nayak
  0 siblings, 0 replies; 2+ messages in thread
From: K Prateek Nayak @ 2026-07-21  2:51 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: Perry Yuan, open list:X86 ARCHITECTURE (32-BIT AND 64-BIT),
	open list:CPU FREQUENCY SCALING FRAMEWORK

Hello Mario,

On 7/15/2026 11:13 PM, Mario Limonciello wrote:
> 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>

Since I've not seen anyone complain about this on servers, and neither did
any of the machine I ran this on, feel free to include:

Reviewed-by: K Prateek Nayak <kprateek.nayak@amd.com>
Tested-by: K Prateek Nayak <kprateek.nayak@amd.com>

The "<" check should be good enough to catch any borken BIOS.

> ---
>  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 a74a4cf99d22e..3d72337a33369 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -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;

-- 
Thanks and Regards,
Prateek


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-21  2:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-15 17:43 [PATCH] cpufreq/amd-pstate: Loosen requirement on lowest nonlinear frequency != min freq Mario Limonciello
2026-07-21  2:51 ` K Prateek Nayak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox