All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpufreq: acpi: Only set boost MSRs on supported CPUs
@ 2022-12-05 17:57 Stuart Hayes
  2022-12-05 18:07 ` stuart hayes
  0 siblings, 1 reply; 4+ messages in thread
From: Stuart Hayes @ 2022-12-05 17:57 UTC (permalink / raw)
  To: Rafael J . Wysocki, Viresh Kumar, Kyle Meyer
  Cc: linux-pm, linux-kernel, Stuart Hayes

Stop trying to set boost MSRs on CPUs that don't support boost.

This corrects a bug in the recent patch "Defer setting boost MSRs".

Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com>
---
 drivers/cpufreq/acpi-cpufreq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index bb58175a8d40..a7c5e312340e 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -888,7 +888,8 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
 	if (perf->states[0].core_frequency * 1000 != freq_table[0].frequency)
 		pr_warn(FW_WARN "P-state 0 is not max freq\n");
 
-	set_boost(policy, acpi_cpufreq_driver.boost_enabled);
+	if (acpi_cpufreq_driver.set_boost)
+		set_boost(policy, acpi_cpufreq_driver.boost_enabled);
 
 	return result;
 
-- 
2.31.1


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

* Re: [PATCH] cpufreq: acpi: Only set boost MSRs on supported CPUs
  2022-12-05 17:57 [PATCH] cpufreq: acpi: Only set boost MSRs on supported CPUs Stuart Hayes
@ 2022-12-05 18:07 ` stuart hayes
  2022-12-06 10:20   ` Borislav Petkov
  0 siblings, 1 reply; 4+ messages in thread
From: stuart hayes @ 2022-12-05 18:07 UTC (permalink / raw)
  To: Rafael J . Wysocki, Viresh Kumar, Kyle Meyer, Borislav Petkov
  Cc: linux-pm, linux-kernel



On 12/5/2022 11:57 AM, Stuart Hayes wrote:
> Stop trying to set boost MSRs on CPUs that don't support boost.
> 
> This corrects a bug in the recent patch "Defer setting boost MSRs".
> 
> Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com>
> ---
>   drivers/cpufreq/acpi-cpufreq.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
> index bb58175a8d40..a7c5e312340e 100644
> --- a/drivers/cpufreq/acpi-cpufreq.c
> +++ b/drivers/cpufreq/acpi-cpufreq.c
> @@ -888,7 +888,8 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
>   	if (perf->states[0].core_frequency * 1000 != freq_table[0].frequency)
>   		pr_warn(FW_WARN "P-state 0 is not max freq\n");
>   
> -	set_boost(policy, acpi_cpufreq_driver.boost_enabled);
> +	if (acpi_cpufreq_driver.set_boost)
> +		set_boost(policy, acpi_cpufreq_driver.boost_enabled);
>   
>   	return result;
>   

My apologies--adding Boris, I forgot to put him on the "to" list.

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

* Re: [PATCH] cpufreq: acpi: Only set boost MSRs on supported CPUs
  2022-12-05 18:07 ` stuart hayes
@ 2022-12-06 10:20   ` Borislav Petkov
  2022-12-06 11:17     ` Rafael J. Wysocki
  0 siblings, 1 reply; 4+ messages in thread
From: Borislav Petkov @ 2022-12-06 10:20 UTC (permalink / raw)
  To: stuart hayes
  Cc: Rafael J . Wysocki, Viresh Kumar, Kyle Meyer, linux-pm, linux-kernel

On Mon, Dec 05, 2022 at 12:07:05PM -0600, stuart hayes wrote:
> 
> 
> On 12/5/2022 11:57 AM, Stuart Hayes wrote:
> > Stop trying to set boost MSRs on CPUs that don't support boost.
> > 
> > This corrects a bug in the recent patch "Defer setting boost MSRs".
> > 
> > Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com>
> > ---
> >   drivers/cpufreq/acpi-cpufreq.c | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
> > index bb58175a8d40..a7c5e312340e 100644
> > --- a/drivers/cpufreq/acpi-cpufreq.c
> > +++ b/drivers/cpufreq/acpi-cpufreq.c
> > @@ -888,7 +888,8 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
> >   	if (perf->states[0].core_frequency * 1000 != freq_table[0].frequency)
> >   		pr_warn(FW_WARN "P-state 0 is not max freq\n");
> > -	set_boost(policy, acpi_cpufreq_driver.boost_enabled);
> > +	if (acpi_cpufreq_driver.set_boost)
> > +		set_boost(policy, acpi_cpufreq_driver.boost_enabled);
> >   	return result;
> 
> My apologies--adding Boris, I forgot to put him on the "to" list.

Yap, that does it.

Reported-by: Borislav Petkov (AMD) <bp@alien8.de>
Tested-by: Borislav Petkov (AMD) <bp@alien8.de>

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

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

* Re: [PATCH] cpufreq: acpi: Only set boost MSRs on supported CPUs
  2022-12-06 10:20   ` Borislav Petkov
@ 2022-12-06 11:17     ` Rafael J. Wysocki
  0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2022-12-06 11:17 UTC (permalink / raw)
  To: Borislav Petkov, stuart hayes
  Cc: Viresh Kumar, Kyle Meyer, linux-pm, linux-kernel

On Tue, Dec 6, 2022 at 11:20 AM Borislav Petkov <bp@alien8.de> wrote:
>
> On Mon, Dec 05, 2022 at 12:07:05PM -0600, stuart hayes wrote:
> >
> >
> > On 12/5/2022 11:57 AM, Stuart Hayes wrote:
> > > Stop trying to set boost MSRs on CPUs that don't support boost.
> > >
> > > This corrects a bug in the recent patch "Defer setting boost MSRs".
> > >
> > > Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com>
> > > ---
> > >   drivers/cpufreq/acpi-cpufreq.c | 3 ++-
> > >   1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
> > > index bb58175a8d40..a7c5e312340e 100644
> > > --- a/drivers/cpufreq/acpi-cpufreq.c
> > > +++ b/drivers/cpufreq/acpi-cpufreq.c
> > > @@ -888,7 +888,8 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
> > >     if (perf->states[0].core_frequency * 1000 != freq_table[0].frequency)
> > >             pr_warn(FW_WARN "P-state 0 is not max freq\n");
> > > -   set_boost(policy, acpi_cpufreq_driver.boost_enabled);
> > > +   if (acpi_cpufreq_driver.set_boost)
> > > +           set_boost(policy, acpi_cpufreq_driver.boost_enabled);
> > >     return result;
> >
> > My apologies--adding Boris, I forgot to put him on the "to" list.
>
> Yap, that does it.
>
> Reported-by: Borislav Petkov (AMD) <bp@alien8.de>
> Tested-by: Borislav Petkov (AMD) <bp@alien8.de>

OK, applied, thanks!

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

end of thread, other threads:[~2022-12-06 11:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-05 17:57 [PATCH] cpufreq: acpi: Only set boost MSRs on supported CPUs Stuart Hayes
2022-12-05 18:07 ` stuart hayes
2022-12-06 10:20   ` Borislav Petkov
2022-12-06 11:17     ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.