From 386e5371a79b8fe5a8610447b5d91bcf610bfcc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 10 Aug 2021 12:09:57 -0400 Subject: [PATCH] util/cpu_detect: add/guess support for next Zen CPUs so that we don't have to update this anymore Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/util/u_cpu_detect.c | 3 +++ src/util/u_cpu_detect.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/util/u_cpu_detect.c b/src/util/u_cpu_detect.c index df52ad4f4b2..ae711aae14f 100644 --- a/src/util/u_cpu_detect.c +++ b/src/util/u_cpu_detect.c @@ -709,6 +709,9 @@ util_cpu_detect_once(void) case 0x19: util_cpu_caps.family = CPU_AMD_ZEN3; break; + default: + if (util_cpu_caps.x86_cpu_type > 0x19) + util_cpu_caps.family = CPU_AMD_ZEN_NEXT; } /* general feature flags */ diff --git a/src/util/u_cpu_detect.h b/src/util/u_cpu_detect.h index 9fd4dd289df..59dd2304e10 100644 --- a/src/util/u_cpu_detect.h +++ b/src/util/u_cpu_detect.h @@ -50,6 +50,7 @@ enum cpu_family { CPU_AMD_ZEN1_ZEN2, CPU_AMD_ZEN_HYGON, CPU_AMD_ZEN3, + CPU_AMD_ZEN_NEXT, CPU_AMD_LAST, };