From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70084.outbound.protection.outlook.com [40.107.7.84]) by sourceware.org (Postfix) with ESMTPS id 1DEF3385E00B for ; Wed, 25 Mar 2020 18:39:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1DEF3385E00B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Wilco.Dijkstra@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9DnVR7DPU+EamihhjMrfllpk4L/ziZeihEjrSp20RGM=; b=hOpc/4j9FO8tpDegCOXK6zqgAwuaG6a9d1UGqwx8c56CLJtvMhViodD8vqIkIus7tXi54rxyFCI/9hIxDgbUBqjGGNaQupFAJQLwaKbbcmSbrYzeQ85IEwXQur3jbEFfMqOMj6pTPpE0Kc5kSbgUvszkjeinlpOK2YHNlj875Xc= Received: from AM5PR0602CA0016.eurprd06.prod.outlook.com (2603:10a6:203:a3::26) by AM6PR08MB3333.eurprd08.prod.outlook.com (2603:10a6:209:45::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.20; Wed, 25 Mar 2020 18:39:08 +0000 Received: from AM5EUR03FT042.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:a3:cafe::c) by AM5PR0602CA0016.outlook.office365.com (2603:10a6:203:a3::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.18 via Frontend Transport; Wed, 25 Mar 2020 18:39:08 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; sourceware.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT042.mail.protection.outlook.com (10.152.17.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2814.13 via Frontend Transport; Wed, 25 Mar 2020 18:39:08 +0000 Received: ("Tessian outbound 19f8d550f75c:v48"); Wed, 25 Mar 2020 18:39:07 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c1528b96c3bb8fb5 X-CR-MTA-TID: 64aa7808 Received: from 1343fa4c4f50.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 3A0D7F61-31CD-489B-80AB-D0CEB63A2A51.1; Wed, 25 Mar 2020 18:39:02 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 1343fa4c4f50.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 25 Mar 2020 18:39:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j82B4aG8C1wLAvTzuvJ2qikXyY8F23P3bXM3+87f0xFfo9Pju1kJX0m6LdOUEmHqxdnWedbJyiVMm0kn67OolFBpCjUQa30nOp1lf7WozK341ENyzUhcEv1E/kWNqVDXjqOL52TpzEz25qBZftg11bEFU/cnh/PrVEQzt763yhXGepT7BhYAQN0ziBRrBmPO3SBNC2MZY/xFltaEmUT/te7Ue7wauGABiFaGOnJtOtJTgPMvB12xGwQITLJlP2B+3fQmmlzfC3DXg0tol87qMPqQaXBX+oyE31+xnH8/naTUDTp5d88HZIjwM273gWH3fcjJiEt7RVmrw8Qa1R3FWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9DnVR7DPU+EamihhjMrfllpk4L/ziZeihEjrSp20RGM=; b=byOMQmgOvwGHgN3kMd4llwYoJ+BNhtln0v3Sv5976qF/aU8mYbFml82ezYep3x4m6n6l/On3xtt1P1y+UN5RGEfTwJNHMdBpjA+69znhLF9DKC8SJ/TzJxR6EySAitzMBzhGusNDiHI/CmcQwiNqf3QLqfHOjD2snaGZOVeKBwKwW+cSyrRywfAgkqKPyjt7dy79EncPiZYTngPiuTXs7to6ig5srmZNRLPa8zgsqi2CBu0Cen/j4675Y18knJQm2XtrtIJ8UvhX0lkVo3GzyHQxXZG5KQu3j61yFriOiURCRdnTrin5WbCvoT0O4Sb8udHIw/TuBf8cVPKXgtjPdQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9DnVR7DPU+EamihhjMrfllpk4L/ziZeihEjrSp20RGM=; b=hOpc/4j9FO8tpDegCOXK6zqgAwuaG6a9d1UGqwx8c56CLJtvMhViodD8vqIkIus7tXi54rxyFCI/9hIxDgbUBqjGGNaQupFAJQLwaKbbcmSbrYzeQ85IEwXQur3jbEFfMqOMj6pTPpE0Kc5kSbgUvszkjeinlpOK2YHNlj875Xc= Received: from AM5PR0801MB2035.eurprd08.prod.outlook.com (10.168.157.147) by AM5PR0801MB2049.eurprd08.prod.outlook.com (10.168.153.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.19; Wed, 25 Mar 2020 18:39:01 +0000 Received: from AM5PR0801MB2035.eurprd08.prod.outlook.com ([fe80::19ff:5219:d351:3199]) by AM5PR0801MB2035.eurprd08.prod.outlook.com ([fe80::19ff:5219:d351:3199%3]) with mapi id 15.20.2835.023; Wed, 25 Mar 2020 18:39:01 +0000 From: Wilco Dijkstra To: "libc-stable@sourceware.org" Subject: [2.26 COMMITTED] aarch64: add HWCAP_ATOMICS to HWCAP_IMPORTANT Thread-Topic: [2.26 COMMITTED] aarch64: add HWCAP_ATOMICS to HWCAP_IMPORTANT Thread-Index: AQHWAtSE0CNewpCgnk6M/1ebFs/3rw== Date: Wed, 25 Mar 2020 18:39:01 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: Authentication-Results-Original: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; x-originating-ip: [82.24.199.97] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 0d3ca5a8-5d24-46df-edcb-08d7d0ebcdac x-ms-traffictypediagnostic: AM5PR0801MB2049:|AM6PR08MB3333: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:2887;OLM:10000; x-forefront-prvs: 0353563E2B X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4636009)(366004)(346002)(396003)(376002)(136003)(39860400002)(71200400001)(26005)(6916009)(8936002)(8676002)(186003)(966005)(2906002)(478600001)(64756008)(66556008)(66476007)(66446008)(66946007)(76116006)(86362001)(52536014)(55016002)(9686003)(33656002)(7696005)(6506007)(81156014)(81166006)(5660300002)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0801MB2049; H:AM5PR0801MB2035.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 21Un8Rsxyu4BsBBVslbniseTORlut82H+vUih9Kk/mkZMi7CqR9zQDbVWjeo6wyhpkTSjiPMRUOlWwbc15t4NTVBA9jp+/3Cr5y3mf+beNMcaaeJvIHl58YKaf2BDZMCDNmPlCtYOy86Xhdc864iEYekIBRQQP66uGwbGUctAvRQYWdf38Xdm0NTCjTLiTOSdzRVKleTO+f+5UaCViTrF5xMFZx/15biXihpfA1cbpbEYeZm6Zw8jG1I4v1A798/SjW85pgntSl7ZiLqr1XRLbxlhQRtik78doSoKHFP+RYBrnqzhBluRZ7DXV/xbARH/KRc5tdVq0LYKFQZ1gFOFmFeCNYl9TrBmP8ewd0VdOP55fAioBb0o1/AB3cu50gctXL8kIju5uEh4PXA9q9FAC9RcB8Y8lMe3xEYX4+feJkmuXKJeGEvBwkk/O+SUbuAnqk/AlOhSvo/5g1sKdgJ1z01tjSpwbuP0AyDdd/2f6MvhTEKw9oYsbPIWDexPpqkSvjp75msMu2WFnFnmuVYxw== x-ms-exchange-antispam-messagedata: 0CzmhwBfrNy8T9rSo+8TsYHFd10/nRddsQD7OhHqYxu8opox/2bVzYmgAYmktzuSNweIkkHRUrXQKtn9B7z7y9mM7a7SrsRLikZAlTetKyxt8XeyedloO3McmmG3qQ42OuHe+icPvryYuwECSYv+zw== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB2049 Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Wilco.Dijkstra@arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT042.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; IPV:CAL; SCL:-1; CTRY:IE; EFV:NLI; SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(136003)(376002)(346002)(396003)(46966005)(966005)(8676002)(52536014)(26005)(478600001)(70206006)(7696005)(82740400003)(70586007)(2906002)(81156014)(55016002)(186003)(6916009)(9686003)(8936002)(316002)(86362001)(336012)(36906005)(81166006)(47076004)(6506007)(356004)(26826003)(5660300002)(33656002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR08MB3333; H:64aa7808-outbound-1.mta.getcheckrecipient.com; FPR:; SPF:Pass; LANG:en; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; X-MS-Office365-Filtering-Correlation-Id-Prvs: 4f7abe9d-3d9b-4885-fedb-08d7d0ebc9b1 X-Forefront-PRVS: 0353563E2B X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /lrZtCBNrYpI7Foj0X2v1bbzrFXKH9B87PfHyg99ErZcDW9kXja77nP6B+cWRF7RTAq/T2VHhXdTTCPp8ntQMiu4eM6QjVc7HLVvzR0D1gAFmt8uu9wmIplWb1D1oEfmd3wRA+KP+tPeCcX3xM2H9zRWrNn9N9q7wGC83YjYSgXsKA9mKbXpc+0AknT3jP50OkH2+/gIxiukeuQyeiW3sYzPC3PT+bgYuLQW//jm3MfV3boVjdRP2xC44ZmABs7BAvM0LHN3AH3kbxRCJoJpHVakgkpELjqGZ9YDR2tP2dd0S4aF/QtlsnCxzzItxzNMVceFZrFjN+fPh+ljhBu78GW0pFJYRIJKAgPGeBwf2pXPfnSX77YWzhwaYELz2T2+vxlc+mXtgvlubR3/z1EmmE6hscrGJBW3uYTfBenMlPbm4VEL5PD1tqRqjSDDsiKnj/Xd27cTNxYvfYPvpKCrW4nSkNUR2iTyIZGfTNtqh0pjt2SCK02tN92cnvaiQpncKJXHiBSmVGqB64hawqgyCXbe0DaPntqEHi99R85dO2fTcV7LKYVuNSaN1kSbMWT1FpChZToqHJBx/jvonLhYoA== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2020 18:39:08.2188 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0d3ca5a8-5d24-46df-edcb-08d7d0ebcdac X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3333 X-Spam-Status: No, score=-33.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY 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-stable@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-stable mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 18:39:12 -0000 This enables searching shared libraries in atomics/ when the hardware supports LSE atomics of armv8.1 so one can provide optimized variants of libraries in a portable way. LSE atomics does not affect library abi, the new instructions can interoperate with old ones. I considered the earlier comments on the patch https://sourceware.org/ml/libc-alpha/2018-04/msg00400.html https://sourceware.org/ml/libc-alpha/2018-04/msg00625.html It turns out that the way glibc dynamic linker decides on the search path is not very flexible: it wants to use hwcap bits and associated strings. So some targets reuse hwcap bits for glibc internal purposes to affect the search logic. But hwcap is an interface with the kernel, glibc should not allocate bits in it for its internal logic as that limits future hwcap extensions and confusing to users who expect to see hwcap bits in ifunc resolvers. Instead of rewriting the dynamic linker path logic (which affects all targets) this patch just uses the existing mechanism, however this means that the path name has to be the hwcap name "atomics" and cannot be changed to something more meaningful to users. It is hard to tell how much performance benefit this can give, in principle armv8.1 atomics can be better optimized in the hardware, so it can make a difference for synchronization heavy code. On some systems such multilib setup may be the only viable way to get optimized libraries used. * sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h (HWCAP_IMPORTANT): = Add HWCAP_ATOMICS. (cherry picked from commit 397c54c1afa531242602fe3ac7bb47eff0e909f9) --- ChangeLog | 5 +++++ sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 732e89d..b10a76f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2018-07-06 Szabolcs Nagy + * sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h (HWCAP_IMPORTANT): = Add + HWCAP_ATOMICS. + +2018-07-06 Szabolcs Nagy + * sysdeps/unix/sysv/linux/aarch64/cpu-features.c (init_cpu_feature= s): Use dl_hwcap without masking. * sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h (HWCAP_IMPORTANT): diff --git a/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h b/sysdeps/unix/s= ysv/linux/aarch64/dl-procinfo.h index 63bdf75..a72eaae 100644 --- a/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h +++ b/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h @@ -34,7 +34,7 @@ #define _DL_HWCAP_LAST 15 /* No additional library search paths. */ -#define HWCAP_IMPORTANT 0 +#define HWCAP_IMPORTANT HWCAP_ATOMICS static inline const char * __attribute__ ((unused)) -- 2.7.4 IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.