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: 13793078 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D74E9CE7AA1 for ; Thu, 5 Sep 2024 23:08:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To: Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=QohUpoUHLQzN3uWl8XuyVxyfCV9gnCF8xep1b7zwgJY=; b=lQMALqrhL2R1OA SDJ6v1VKPIeTvRwapTPP5OHF/qpBNTVtVKsN+SVgJmlJfbOdqxIEw8x+lTHuYAH1WZRBh1pSnt2jn rGyv5xXEMiVJXWpHiXcwU/wgDLkFBcSvI6exlXnMh/s4NaeS3VrlOghSnTW6rKGEU5qbZRzpylL1o Kkij9jSH1oDOpvg6BBQ7qXe8c89O2fv7GnoTBPeSYkQZGBnfti8+WmJOKlIAKR7HLlJBtRSNjcrXS FVDCwr09uboDUtxW68lbHW8kjAuwqQ51ipYvea4oXCMRu3YMdTf1SFVYjkPF1cXFEbVTBhjha4jXN D6149+hZh88RKlX7PUgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smLa0-0000000A5D0-2YGx; Thu, 05 Sep 2024 23:07:56 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smLZ0-0000000A4vH-0lno for linux-arm-kernel@lists.infradead.org; Thu, 05 Sep 2024 23:06:55 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240905_160654_388841_1C3981DF X-CRM114-Status: GOOD ( 12.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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,