From patchwork Thu Sep 5 23:05:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13793075 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 349E9CE7AA1 for ; Thu, 5 Sep 2024 23:06:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8192D6B0083; Thu, 5 Sep 2024 19:06:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7C95C6B0085; Thu, 5 Sep 2024 19:06:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6B7EF6B0088; Thu, 5 Sep 2024 19:06:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 482FE6B0083 for ; Thu, 5 Sep 2024 19:06:56 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id AD0B5A0CC5 for ; Thu, 5 Sep 2024 23:06:55 +0000 (UTC) X-FDA: 82532221590.12.258EA2A Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf29.hostedemail.com (Postfix) with ESMTP id 065BE120007 for ; Thu, 5 Sep 2024 23:06:53 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=S3KYMhsC; spf=pass (imf29.hostedemail.com: domain of broonie@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=broonie@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725577517; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=QohUpoUHLQzN3uWl8XuyVxyfCV9gnCF8xep1b7zwgJY=; b=pLyeMaYUR7zsSZ9kj8UXVcCXBzBXdUD3b96TzrQ2rN0iZLimvHJ52RBaFbSS+XReDfjH1y UN4afqqqVMe0YVObwCm+qtrOWAhisY1iCfq7n/r7piCzzyxWZD1gWRZ7BoklD1R48sOgEB vg5LtGIHbeQHbIw78vMzfZFufAsjljM= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725577517; a=rsa-sha256; cv=none; b=pLINFN4KZ3IO2GZ0WUChFm9FhS7o2LkTKpqErLBCoFWTjrBl7x6GVFxO8v8G4K8pvejwcI FAOFJyW10SAP8/coyUkRCNWhCCTw9yiVIc9OG2qbkr7XZp50AQWC8ZrtVj7dnkAXiaFaUK AnkOMV+wMLYrl4/ExYN6MXLVwVeNXUQ= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=S3KYMhsC; spf=pass (imf29.hostedemail.com: domain of broonie@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=broonie@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id CB4FEA4335A; Thu, 5 Sep 2024 23:06:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5B26C4CEC3; Thu, 5 Sep 2024 23:06:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725577612; bh=CPoDkYNnJw32LYds6YH/ngdRgMIgp8fiMKSJ3WMd49Q=; h=From:Subject:Date:To:Cc:From; b=S3KYMhsC7Sg/8R3rfUwyhAW8xdl9AJ5/dEkSkTbFLJIKOa/Kgv535MJHxODrkWzBN rbxVxcltB9dB7TW4p6lV73L8gJRMbk5fzgmLASfUl0PIQbgDx1s9Yrz9oh//hwZo1r VGA6CqaanA2292AqUKgeGZrFCPAQCMq/zRWUkGjKY8TzqnWwKurk1ljSatk88pkBbk 2PXo7ASmGZ4hzjYbCYa5PrMxUGynwwMyr2JlwC8O8mgzj+oWR5vpwA2JCPjwxsVvP4 8z3z/F0iTl5Py1L2FFr/c+RXlMIPpODUHCrtZwSGw2Hvmkz1sVs07pXT5ksOOJie9l 9b0tgdnGJIBag== From: Mark Brown Subject: [PATCH RFC 0/2] arm64: Add infrastructure for use of AT_HWCAP3 Date: Fri, 06 Sep 2024 00:05:23 +0100 Message-Id: <20240906-arm64-elf-hwcap3-v1-0-8df1a5e63508@kernel.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIADM52mYC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDSwNT3cSiXDMT3dScNN2M8uTEAmNdc3MDy2RTU0vjFGMTJaC2gqLUtMw KsJHRSkFuzkqxtbUA7ybGrWcAAAA= To: Alexander Viro , Christian Brauner , Jan Kara , Eric Biederman , Kees Cook , Catalin Marinas , Will Deacon , Jonathan Corbet Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yury Khrustalev , Wilco Dijkstra , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, Mark Brown X-Mailer: b4 0.15-dev-99b12 X-Developer-Signature: v=1; a=openpgp-sha256; l=1558; i=broonie@kernel.org; h=from:subject:message-id; bh=CPoDkYNnJw32LYds6YH/ngdRgMIgp8fiMKSJ3WMd49Q=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBm2jmH+9Ah9sC12NbAxu3lH//yIxqpau2tH5r/wKBy OZ4ndN+JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZto5hwAKCRAk1otyXVSH0M0GB/ 9+yDgb9c3DrrqPt6+lrQ8J5wLz0bPg8fxi42o/cU51UtOJIo3jDK8qIyGVt4sNPOAEnedIdeonZYCM UA6vMgHkXNIV0RQGtCdNbBU0S4GSoeaN1Dbm0YUXvArQ2i+J2e9hWe+6o5jEoCKkUQulb8pIVZYBCq Hwz5ENScRV4rK2yeH3CG7digDIR/qRKiF4L24vRCp2ApbHpyVC+CmYtI66WMlMBylVHTUXv8HPyblc Fo9tUdCPYPAD8rN7DqvqdKUOZDQ96Pn5gjZE5noM3VNgHLRYctd/fgNx8N2vCl1onFnqAhpRXjIhBO sDgAjKOBeQug/qJcsQYdrOl20OUzRz X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-Rspamd-Queue-Id: 065BE120007 X-Stat-Signature: 4ytk3psuobjaqtf4twoimwk79d4cj153 X-Rspamd-Server: rspam09 X-Rspam-User: X-HE-Tag: 1725577613-731423 X-HE-Meta: U2FsdGVkX19kRHsMRwT/9tYmf3+AmzPBUM4nxh16u+4dGRaPTiKXxlz3zjOi600FWYn79/9O8bY0NUCyNFmVkIhuTMsIoRVeMV/Ht6uIsnD/Y9YIRhCpyN6vRrC8rsrwCU56ZQOygY/ofUkxYEr7BEe2LqkPrN7IJ927QwGvyQHSw3xi4vGO0i3zoGjtv8JCodhvEp244srWpoDwzchYrtV3284zeQ5owm45L9aZc9mRZGlJ1vY8XNXYK1oM6FPRjdip91sMVGVX5QI4sXW5fBJn4RUe8/RgkgL8RuPdZNzrQ3TS9wNEYwu0SLA+GNiSWjptnjTS4zz5yTFD67Pm+yXglXK201mWQGhaK5eulUMq3Gakz+6wx5TNIJ581xI+p/Y+26BQRML/IxxQNLlnHwtPiYHQS+aWyg9AINCWWe2wqEe6shlUvx6pVVz7/D5J/r3VMZVsLEOiOj54H108zFbUGWeLRau7HeFPU1cxmvr1VVlj7KdOYYYkwXDZjuLprowFAodD9L0YCLdHHCEqYVW9QCTN0QRa59EpkaInuxIa4zx1vUahzOsCQ5R7c6FjdnE6KnLsSj86v//Z/fia7pOHA+AEpyt2r1HYZL2INxsIHM41jw8gT/gcA523Mez6KrUWRP7qE/pCNelp4I3qsqenE3UemxvxrSICth3R4N2XpMWa6Wkkvr2syt5NevqfKiyE3XcZkha8ePShsSQPC/4cyN1M74RgySgBGm/4qycOS7hD2R4fVq5ySF+PzbvwXOBvVGugql5goaKOZxWa39dCR/PEOzc56ZYvoqwjUxEzGAdR7BpAaWN49jyTcAOrld4D+nXs5kb4t9cG/EzRwomNm2dKZOA1CZeHTDs2PBl1RVdjB4surxz1AXalzQencQp7YOQcSwQOTU4dOb1NyrrGa7ueBUHTtxI8NWmkezWEnqGbXql4ESf4M/y+VgLw3O3JX6Z/G7/cS8pOH4V P+7Z2CW7 V8kiB3ZobDGKSVGXOOISnKs+g3lA6DUrJ8GvzqzYsCWjU8FJFHEoCcEuW569UUjuOgAsxAuo7w7mx1EI+4iL7bIDmEWXOXL9QblfsrbDS4oMaLVEBz13CFg6zBi9cpxgantWUH3kEEz/t5jHVmJNWzTNILG+hfgtPTduChZh/1oTA+AYg17GMJEr7+e0UFaEmu+iTWPv/MYhGXQFZ9grGgBc/jp4SQ6B/OHdpCAUabSEafSr/3qKNJx3sj4vYq5Y4h9f9Q+pxQRzzVFNRtWwRoXgFXECXUpT//KTX X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Since arm64 has now used all of AT_HWCAP2 it needs to either start using AT_HWCAP3 (which was recently added for PowerPC) or start allocating bits 32..61 of AT_HWCAP first. Those are documented in elf_hwcaps.rst as unused and in uapi/asm/hwcap.h as unallocated for potential use by libc, glibc does currently use bits 62 and 63. This series has the code for enabling AT_HWCAP3 as a reference. We will at some point need to bite this bullet but we need to decide if it's now or later. Given that we used the high bits of AT_HWCAP2 first and AT_HWCAP3 is already defined it feels like that might be people's preference, in order to minimise churn in serieses adding new HWCAPs it'd be good to get consensus if that's the case or not. Signed-off-by: Mark Brown --- Mark Brown (2): binfmt_elf: Wire up AT_HWCAP3 at AT_HWCAP4 arm64: Support AT_HWCAP3 Documentation/arch/arm64/elf_hwcaps.rst | 6 +++--- arch/arm64/include/asm/cpufeature.h | 3 ++- arch/arm64/include/asm/hwcap.h | 6 +++++- arch/arm64/include/uapi/asm/hwcap.h | 4 ++++ arch/arm64/kernel/cpufeature.c | 6 ++++++ fs/binfmt_elf.c | 6 ++++++ fs/binfmt_elf_fdpic.c | 6 ++++++ fs/compat_binfmt_elf.c | 15 +++++++++++++++ 8 files changed, 47 insertions(+), 5 deletions(-) --- base-commit: 7c626ce4bae1ac14f60076d00eafe71af30450ba change-id: 20240905-arm64-elf-hwcap3-7709c5593d34 Best regards,