From patchwork Fri Mar 10 03:43:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: DJ Delorie X-Patchwork-Id: 66198 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DFC7D385841D for ; Fri, 10 Mar 2023 03:43:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DFC7D385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1678419813; bh=SJttuodekn+cZnIWvMqLW7pyI888TsM2f4HDl/F5O78=; h=Date:To:CC:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=UGYQWWHzG8rTL+Uw7q2dmRqtqniUU5beB+JfNW2HGiG+f2MqjssVcrZP3pynqPoyA cjKnDp75vJRTtwG03n5d5zi2QNvz87a626qP9hkTDV+I7kyQBjQC8xV4kIJAIerIzq vW2HpR14E9yfwH10vY7PmovkwaQYAnnnJP5+VFH0= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 0F60C3858C5E for ; Fri, 10 Mar 2023 03:43:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0F60C3858C5E Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-322-F5YS-ftvPr-QzY8UkLOobA-1; Thu, 09 Mar 2023 22:43:07 -0500 X-MC-Unique: F5YS-ftvPr-QzY8UkLOobA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3E7D0857A84; Fri, 10 Mar 2023 03:43:07 +0000 (UTC) Received: from greed.delorie.com (unknown [10.22.9.14]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 24F7C40C1106; Fri, 10 Mar 2023 03:43:07 +0000 (UTC) Received: from greed.delorie.com.redhat.com (localhost [127.0.0.1]) by greed.delorie.com (8.15.2/8.15.2) with ESMTP id 32A3h6WY3276952; Thu, 9 Mar 2023 22:43:06 -0500 Date: Thu, 09 Mar 2023 22:43:06 -0500 Message-Id: To: libc-alpha@sourceware.org CC: hjl.tools@gmail.com Subject: x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: DJ Delorie via Libc-alpha From: DJ Delorie Reply-To: DJ Delorie Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" 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 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. Reviewed-by: Noah Goldstein 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);