linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] x86/cpu/amd: fix the highest perf query for new AMD processors
@ 2022-06-14  8:52 Perry Yuan
  2022-06-15  4:17 ` Huang Rui
  0 siblings, 1 reply; 2+ messages in thread
From: Perry Yuan @ 2022-06-14  8:52 UTC (permalink / raw)
  To: Ray.Huang, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	Dave Hansen, x86, H. Peter Anvin, Perry Yuan, Kim Phillips,
	Tom Lendacky, Tony Luck, Jane Malalane, Mario Limonciello,
	linux-kernel
  Cc: Jinzhou.Su, Li.Meng, linux-pm

In order to get the corrent highest perf for some new AMD processors,
the amd_get_highest_perf() call will check the CPU model and
return correct highest perf value.

Signed-off-by: Perry Yuan <Perry.Yuan@amd.com>
---
 arch/x86/kernel/cpu/amd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 0c0b09796ced..ff2075f26ef4 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -1152,7 +1152,8 @@ u32 amd_get_highest_perf(void)
 	struct cpuinfo_x86 *c = &boot_cpu_data;
 
 	if (c->x86 == 0x17 && ((c->x86_model >= 0x30 && c->x86_model < 0x40) ||
-			       (c->x86_model >= 0x70 && c->x86_model < 0x80)))
+			       (c->x86_model >= 0x70 && c->x86_model < 0x80) ||
+			       (c->x86_model >= 0xa0 && c->x86_model < 0xb0)))
 		return 166;
 
 	if (c->x86 == 0x19 && ((c->x86_model >= 0x20 && c->x86_model < 0x30) ||
-- 
2.25.1


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

* Re: [PATCH v2] x86/cpu/amd: fix the highest perf query for new AMD processors
  2022-06-14  8:52 [PATCH v2] x86/cpu/amd: fix the highest perf query for new AMD processors Perry Yuan
@ 2022-06-15  4:17 ` Huang Rui
  0 siblings, 0 replies; 2+ messages in thread
From: Huang Rui @ 2022-06-15  4:17 UTC (permalink / raw)
  To: Yuan, Perry
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H. Peter Anvin, Phillips, Kim, Lendacky, Thomas, Tony Luck,
	Jane Malalane, Limonciello, Mario, linux-kernel, Su,
	Jinzhou (Joe), Meng, Li (Jassmine),
	linux-pm

On Tue, Jun 14, 2022 at 04:52:54PM +0800, Yuan, Perry wrote:
> In order to get the corrent highest perf for some new AMD processors,
> the amd_get_highest_perf() call will check the CPU model and
> return correct highest perf value.
> 
> Signed-off-by: Perry Yuan <Perry.Yuan@amd.com>

Acked-by: Huang Rui <ray.huang@amd.com>

> ---
>  arch/x86/kernel/cpu/amd.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
> index 0c0b09796ced..ff2075f26ef4 100644
> --- a/arch/x86/kernel/cpu/amd.c
> +++ b/arch/x86/kernel/cpu/amd.c
> @@ -1152,7 +1152,8 @@ u32 amd_get_highest_perf(void)
>  	struct cpuinfo_x86 *c = &boot_cpu_data;
>  
>  	if (c->x86 == 0x17 && ((c->x86_model >= 0x30 && c->x86_model < 0x40) ||
> -			       (c->x86_model >= 0x70 && c->x86_model < 0x80)))
> +			       (c->x86_model >= 0x70 && c->x86_model < 0x80) ||
> +			       (c->x86_model >= 0xa0 && c->x86_model < 0xb0)))
>  		return 166;
>  
>  	if (c->x86 == 0x19 && ((c->x86_model >= 0x20 && c->x86_model < 0x30) ||
> -- 
> 2.25.1
> 

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

end of thread, other threads:[~2022-06-15  4:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-14  8:52 [PATCH v2] x86/cpu/amd: fix the highest perf query for new AMD processors Perry Yuan
2022-06-15  4:17 ` Huang Rui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).