From: Noah Goldstein <goldstein.w.n@gmail.com>
To: DJ Delorie <dj@redhat.com>
Cc: libc-alpha@sourceware.org, hjl.tools@gmail.com
Subject: Re: x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c
Date: Thu, 9 Mar 2023 23:01:37 -0600 [thread overview]
Message-ID: <CAFUsyfK8orSvJuxQzfr_4MbKhk7_0HBpy3h_vucPggL=_jeJYQ@mail.gmail.com> (raw)
In-Reply-To: <xnr0tx46gl.fsf@greed.delorie.com>
On Thu, Mar 9, 2023 at 9:43 PM DJ Delorie via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
>
> 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)
Does platform/x86.h need to be updated as well? Although that might be harder
to change as its user facing.
> > #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);
>
next prev parent reply other threads:[~2023-03-10 5:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 3:43 DJ Delorie
2023-03-10 5:01 ` Noah Goldstein [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFUsyfK8orSvJuxQzfr_4MbKhk7_0HBpy3h_vucPggL=_jeJYQ@mail.gmail.com' \
--to=goldstein.w.n@gmail.com \
--cc=dj@redhat.com \
--cc=hjl.tools@gmail.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).