x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c

DJ Delorie dj@redhat.com
Fri Mar 10 03:43:06 GMT 2023


As not noted in the kernel sources:

> /* Intel-defined CPU features, CPUID level 0x00000007:0 (ECX), word 16 */
> #define X86_FEATURE_AVX512VBMI          (16*32+ 1) /* AVX512 Vector Bit Manipulation instructions*/
> #define X86_FEATURE_UMIP                (16*32+ 2) /* User Mode Instruction Protection */

vs glibc:

> /* ECX.  */
> #define bit_cpu_PREFETCHWT1	(1u << 0)
> #define bit_cpu_AVX512_VBMI	(1u << 1)
> #define bit_cpu_UMIP		(1u << 2)

Tested on the one machine I could find in our inventory that set that flag:

- FAIL: elf/tst-cpu-features-cpuinfo
- FAIL: elf/tst-cpu-features-cpuinfo-static
-     27 FAIL
+     23 FAIL

(there were two unrelated timeouts in the "before" results)

>From c4a62abbeac4ced531ced3999a2cd2d4fab6bdc6 Mon Sep 17 00:00:00 2001
From: DJ Delorie <dj@redhat.com>
Date: Thu, 9 Mar 2023 22:32:54 -0500
Subject: x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c

Don't check PREFETCHWT1 against /proc/cpuinfo since kernel doesn't report
PREFETCHWT1 in /proc/cpuinfo.

diff --git a/sysdeps/x86/tst-cpu-features-cpuinfo.c b/sysdeps/x86/tst-cpu-features-cpuinfo.c
index c25240774e..e963592c4b 100644
--- a/sysdeps/x86/tst-cpu-features-cpuinfo.c
+++ b/sysdeps/x86/tst-cpu-features-cpuinfo.c
@@ -217,7 +217,10 @@ do_test (int argc, char **argv)
   fails += CHECK_PROC (pku, PKU);
   fails += CHECK_PROC (popcnt, POPCNT);
   fails += CHECK_PROC (3dnowprefetch, PREFETCHW);
+#if 0
+  /* NB: /proc/cpuinfo doesn't report this feature.  */
   fails += CHECK_PROC (prefetchwt1, PREFETCHWT1);
+#endif
 #if 0
   /* NB: /proc/cpuinfo doesn't report this feature.  */
   fails += CHECK_PROC (ptwrite, PTWRITE);



More information about the Libc-alpha mailing list