From patchwork Fri Feb 17 19:56:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 729284 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vQ3gr49Qbz9s7n for ; Sat, 18 Feb 2017 06:56:40 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="udQt9V+7"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:reply-to :mime-version:content-type; q=dns; s=default; b=KRsxlDF1fbx9TUTZ 2j70CQFYj3t0MOaF8L8F1dd98SJHwaqpyeNgBt8MySmKXZu9VHF7/QlNJu1ECdLk kwf88xmP1E/2HZXc1qqp3pyVR88rWCyLO7qQbqpqss4GDhnboBlnQ6o2Rk2IE/zl dDWKWf4nbH0ydX1dTRXihhskYaQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:reply-to :mime-version:content-type; s=default; bh=gaVlyv19nQJjEQ4n9hvR+8 pAov0=; b=udQt9V+7UaIbat7ISKBM6/en36GyUpsQoaPzMrMuLakABYXV6bbnIu MhTkMs2HhNpF1ohO+G3ZuR0VwzfAUYTGsOSxUTPbe822mBDnYr2Snf8VHrADbL5n auVvCRzAQ0XuOKgUSHWBtwxJ5Y2kCEaMVeFU+xs1c/ZVA/65YrpS4= Received: (qmail 54226 invoked by alias); 17 Feb 2017 19:56:31 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 52073 invoked by uid 89); 17 Feb 2017 19:56:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, NO_DNS_FOR_FROM, RP_MATCHES_RCVD, URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: mga01.intel.com X-ExtLoop1: 1 Date: Fri, 17 Feb 2017 11:56:15 -0800 From: "H.J. Lu" To: GNU C Library Cc: Andrew Senkevich Subject: [PATCH, committed] Use index_cpu_RTM and reg_RTM to clear the bit_cpu_RTM bit Message-ID: <20170217195615.GA26684@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.7.1 (2016-10-04) Tested on x86-64. elf/ld.so and libc.so are identical before and after the change. H.J. --- * sysdeps/x86/cpu-features.c (init_cpu_features): Use index_cpu_RTM and reg_RTM to clear the bit_cpu_RTM bit. --- ChangeLog | 5 +++++ sysdeps/x86/cpu-features.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index daa26c8..c846949 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-02-17 H.J. Lu + + * sysdeps/x86/cpu-features.c (init_cpu_features): Use + index_cpu_RTM and reg_RTM to clear the bit_cpu_RTM bit. + 2017-02-17 Joseph Myers * math/auto-libm-test-in: Add tests of catan and catanh. diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c index 1c714a4..4e8f179 100644 --- a/sysdeps/x86/cpu-features.c +++ b/sysdeps/x86/cpu-features.c @@ -215,7 +215,7 @@ init_cpu_features (struct cpu_features *cpu_features) with stepping >= 4) to avoid TSX on kernels that weren't updated with the latest microcode package (which disables broken feature by default). */ - cpu_features->cpuid[COMMON_CPUID_INDEX_7].ebx &= ~(bit_cpu_RTM); + cpu_features->cpuid[index_cpu_RTM].reg_RTM &= ~bit_cpu_RTM; break; } }