From 159c7973628c98a3c78fe287592b79d06421b7f7 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Sun, 9 Apr 2023 12:25:14 -0700 Subject: [PATCH] util/u_cpu_detect: Drop unused has_tsc This will allow us to add has_clflushopt without spilling into an new unsigned. Suggested-by: Kenneth Graunke Signed-off-by: Jordan Justen Reviewed-by: Kenneth Graunke Reviewed-by: Lionel Landwerlin Part-of: --- src/util/u_cpu_detect.c | 2 -- src/util/u_cpu_detect.h | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/util/u_cpu_detect.c b/src/util/u_cpu_detect.c index ee38d3f..395c93b 100644 --- a/src/util/u_cpu_detect.c +++ b/src/util/u_cpu_detect.c @@ -853,7 +853,6 @@ _util_cpu_detect_once(void) } /* general feature flags */ - util_cpu_caps.has_tsc = (regs2[3] >> 4) & 1; /* 0x0000010 */ util_cpu_caps.has_mmx = (regs2[3] >> 23) & 1; /* 0x0800000 */ util_cpu_caps.has_sse = (regs2[3] >> 25) & 1; /* 0x2000000 */ util_cpu_caps.has_sse2 = (regs2[3] >> 26) & 1; /* 0x4000000 */ @@ -958,7 +957,6 @@ _util_cpu_detect_once(void) printf("util_cpu_caps.x86_cpu_type = %u\n", util_cpu_caps.x86_cpu_type); printf("util_cpu_caps.cacheline = %u\n", util_cpu_caps.cacheline); - printf("util_cpu_caps.has_tsc = %u\n", util_cpu_caps.has_tsc); printf("util_cpu_caps.has_mmx = %u\n", util_cpu_caps.has_mmx); printf("util_cpu_caps.has_mmx2 = %u\n", util_cpu_caps.has_mmx2); printf("util_cpu_caps.has_sse = %u\n", util_cpu_caps.has_sse); diff --git a/src/util/u_cpu_detect.h b/src/util/u_cpu_detect.h index f9db16f..86ce912 100644 --- a/src/util/u_cpu_detect.h +++ b/src/util/u_cpu_detect.h @@ -88,7 +88,6 @@ struct util_cpu_caps_t { unsigned cacheline; unsigned has_intel:1; - unsigned has_tsc:1; unsigned has_mmx:1; unsigned has_mmx2:1; unsigned has_sse:1; @@ -121,6 +120,8 @@ struct util_cpu_caps_t { unsigned has_avx512vl:1; unsigned has_avx512vbmi:1; + unsigned unused:1; + unsigned num_L3_caches; unsigned num_cpu_mask_bits; unsigned max_vector_bits; -- 2.7.4