From patchwork Tue Feb 2 15:01:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 41897 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 7AE0A3988812; Tue, 2 Feb 2021 15:01:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7AE0A3988812 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1612278112; bh=f9AOYS1348l9EMRXKHr9AvjqMZbrdor55G1IHX/JZxM=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=xo/A2j7WIk/4eNxr6v5RtWzSUiDAO88IvoDx4Lj0TFoM3e8YH67NPg4x/EX4xkohC zwUXKvNWS+11Yr5MR9cldR7aE/IG733UwMPDt0CWHzFUgfeNGlVyxS2nt2eP8MWJ+M wLTUPMQjh4lQLX5GCiLRBf2Duc7ORaN0pAy8o6aI= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by sourceware.org (Postfix) with ESMTPS id 3EC6B386EC7A for ; Tue, 2 Feb 2021 15:01:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3EC6B386EC7A Received: by mail-pj1-x102a.google.com with SMTP id d2so2531737pjs.4 for ; Tue, 02 Feb 2021 07:01:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=f9AOYS1348l9EMRXKHr9AvjqMZbrdor55G1IHX/JZxM=; b=KZhH5g5vdZmpqY8UyuJjqH73FQOYFo6SMsL3ovWOJu/kjROOrruKIt/lVwMjFkKA+f CqB6pmMP02C8kSm55K2Qs45mG1BV3ntVJVvViFbRvyAMCeVH/Lc7WMn65A61e7XY06In eJx5CefvtxoZQFRjRZn2+HBBgf5imaP0elVIEB5TckusemAYqTBs6ST2bK7D9tWKBcud 9jHFhKzPyyVnd2kc6Z9+ywjxIn5XwsFUKUE/hXxdrfzv9Wh+JRyzJHjFJAnG2yf2wNqE 2o8BhjrQIeTcJ0qNPVaNuYFXpOr3Tr6ePYxGgEoUli66IE8x/aWeE0IZ0K5R29fSYwuT VDpA== X-Gm-Message-State: AOAM530gscqDIinc2zrlfIEBg6nfCMVZcr7PwGXTiZaS3Kjm0hN7NcNU 64fbYsh7XRVFSQF0BrmJP9s= X-Google-Smtp-Source: ABdhPJylw7ZAubii+MAeXc/JzvJLzumZ7Q9LOGzwUCcL6qc6ODDajpNqG/Y0FZXM3kMn7UF69noMqA== X-Received: by 2002:a17:903:230b:b029:dd:7cf1:8c33 with SMTP id d11-20020a170903230bb02900dd7cf18c33mr22971702plh.31.1612278101226; Tue, 02 Feb 2021 07:01:41 -0800 (PST) Received: from gnu-cfl-2.localdomain (c-69-181-90-243.hsd1.ca.comcast.net. [69.181.90.243]) by smtp.gmail.com with ESMTPSA id a5sm22135570pgl.41.2021.02.02.07.01.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 07:01:40 -0800 (PST) Received: by gnu-cfl-2.localdomain (Postfix, from userid 1000) id 8A7481A04D5; Tue, 2 Feb 2021 07:01:39 -0800 (PST) Date: Tue, 2 Feb 2021 07:01:39 -0800 To: Andreas Schwab Subject: [PATCH] : Correct x86_cpu_TBM Message-ID: <20210202150139.GA545211@gmail.com> References: <20210121194740.2786158-1-hjl.tools@gmail.com> <9c8d88ef-13c3-144f-d6eb-0cf0463f54d8@linaro.org> <8735yevib8.fsf@igel.home> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <8735yevib8.fsf@igel.home> X-Spam-Status: No, score=-3039.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: "H.J. Lu via Libc-alpha" From: "H.J. Lu" Reply-To: "H.J. Lu" Cc: libc-alpha@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" On Tue, Feb 02, 2021 at 12:07:55PM +0100, Andreas Schwab wrote: > ------ FAIL: elf/tst-cpu-features-cpuinfo ------ > Checking HAS_CPU_FEATURE (SSBD): > HAS_CPU_FEATURE (SSBD): 0 > cpuinfo (ssbd): 1 > *** failure *** This should be fixed by https://sourceware.org/pipermail/libc-alpha/2021-February/122244.html > Checking HAS_CPU_FEATURE (TBM): > HAS_CPU_FEATURE (TBM): 0 > cpuinfo (tbm): 1 > *** failure *** Please try th patch enclosed here. > 2 differences between /proc/cpuinfo and glibc code. > Thanks. H.J. --- x86_cpu_TBM should be x86_cpu_index_80000001_ecx + 21. --- sysdeps/x86/bits/platform/x86.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/x86/bits/platform/x86.h b/sysdeps/x86/bits/platform/x86.h index 8f423ae721..dd59224b7f 100644 --- a/sysdeps/x86/bits/platform/x86.h +++ b/sysdeps/x86/bits/platform/x86.h @@ -244,7 +244,7 @@ enum x86_cpu_XOP = x86_cpu_index_80000001_ecx + 11, x86_cpu_LWP = x86_cpu_index_80000001_ecx + 15, x86_cpu_FMA4 = x86_cpu_index_80000001_ecx + 16, - x86_cpu_TBM = x86_cpu_index_80000001_ecx + 20, + x86_cpu_TBM = x86_cpu_index_80000001_ecx + 21, x86_cpu_index_80000001_edx = (CPUID_INDEX_80000001 * 8 * 4 * sizeof (unsigned int)