public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c
@ 2023-03-10  3:43 DJ Delorie
  2023-03-10  5:01 ` Noah Goldstein
  2023-03-10  7:04 ` Noah Goldstein
  0 siblings, 2 replies; 8+ messages in thread
From: DJ Delorie @ 2023-03-10  3:43 UTC (permalink / raw)
  To: libc-alpha; +Cc: hjl.tools


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);


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

end of thread, other threads:[~2023-03-22  0:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-10  3:43 x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c DJ Delorie
2023-03-10  5:01 ` Noah Goldstein
2023-03-10  5:10   ` DJ Delorie
2023-03-10  7:04     ` Noah Goldstein
2023-03-10  7:04 ` Noah Goldstein
2023-03-20 19:01   ` DJ Delorie
2023-03-21 18:01   ` Noah Goldstein
2023-03-22  0:08     ` DJ Delorie

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 read-only IMAP folder(s) and NNTP newsgroup(s).