Skip to contentSkip to conversation

x86/cpu/amd: fix the highest perf query for new AMD processors

PATCH Superseded Perry Yuan 2 participants 2 messages Jun 14, 2022 – Jun 15, 2022 x86

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Perry Yuan

author
#0 lore raw

PATCH v2 1/1 x86/cpu/amd: fix the highest perf query for new AMD processors

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.

---
 arch/x86/kernel/cpu/amd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/kernel/cpu/amd.c +2 -1
index 0c0b09796ced..ff2075f26ef4 100644
@@ -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) ||
Signature · 1 line
2.25.1
Acked-by on v2 1/1
#1 lore raw
Quoted 5 lines · Perry

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.

Quoted 21 lines
---
 arch/x86/kernel/cpu/amd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/kernel/cpu/amd.c +2 -1
index 0c0b09796ced..ff2075f26ef4 100644
@@ -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) ||
Signature · 1 line
2.25.1