From mboxrd@z Thu Jan 1 00:00:00 1970 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 90A3CC63703 for ; Thu, 8 Dec 2022 16:14:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Message-Id:Date:From:MIME-Version :Subject: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=m/m2Ax2tIy6E2VbYV2P5KGDQ9kx2Q54RENDZIxFf5FY=; b=A9GEBryirGsqqv bsV5EvAVPHuwMoZQD9pk0RN2khDKN5hfgSU32deQXxw7WscgZ8jIa/eokoslXAFSNhttcGYGjk37N 6uRAyj4S89BnZFMpflqaejnlMbtTwsLcDjLDyTrteAiVbplOtlNFXWsDxtjDS8YXAlp6EETaU2t8G MNRoI1EsQFQUsgrhOPw15hau9i5OIDjeR0tLWjme4b01tCqea3UniygdZ9VcsdS6dvPvLYeObqiua uyzQDWJHLQiwh5uBI+C3F7SoMijSJ0tzqLHhf6AzCnYJK9yx30qOubVQZsy26KZ89FvTnCSL5P7g9 LQmXUW72stUuMsnX3MXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3JWG-004w6g-Kj; Thu, 08 Dec 2022 16:13:08 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3JWD-004w3R-JA for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 16:13:07 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 00894B824B2; Thu, 8 Dec 2022 16:13:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8117BC433F0; Thu, 8 Dec 2022 16:13:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670515982; bh=ZHyByk0NDT2ZuQHNXpvys37fcgXTgfrqtAicIue4Irk=; h=Subject:From:Date:To:Cc:From; b=lKLOf1GglGpfQh7T9f/WPlgKZmgwqQSawXmwvzS3m4jO6HybSDMGRMRuDpJpWPYeV 56CB7PcJXMNXjcNVnVrd6ddqcqn341rwSl2unu6RROm59w2JgRGYLwS+fB0E2G/qgt dGAP0uAGN+DNMKMSq5G0p1CL/M9f3IoBct2/HQT7xQixFt31/nxpIP3YpAhibTKwro SIKJOVOgwdf2e15apdW/kUm5lyI/9KIQ8XD+6lraRh0ZCH/IGNKvTYUcaOvmdDh5vR M6ln8Hp9jAr1Bd50CTiE1gkioy4HUcopSPDFnN9a1ELmNxuRmGjK513k+tR5hGdQqy b1jQkNLjMTtBQ== Subject: [PATCH 0/6] arm64/cpufeature: Make use of sysreg helpers for hwcaps MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAMkKkmMC/x2N0QrCMAwAf2Xk2cAWS4v+ivjQzmwNajcSUMfYv6 /z8Q6OW8FYhQ2uzQrKHzGZSoXu1ECfYxkZ5VEZqCXqqA0Y9e0d2mLKI2Z+zayGPpydd5TCkC5Q0x SNMWksfT7i76TPQ8/Kg/z+t9t923aXav0qfQAAAA== From: Mark Brown Date: Thu, 08 Dec 2022 16:03:21 +0000 Message-Id: <20221207-arm64-sysreg-helpers-v1-0-149fa1308a23@kernel.org> To: Catalin Marinas , Will Deacon Cc: Suzuki K Poulose , James Morse , linux-arm-kernel@lists.infradead.org, Mark Brown X-Mailer: b4 0.11.0-dev-64ef0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2374; i=broonie@kernel.org; h=from:subject:message-id; bh=ZHyByk0NDT2ZuQHNXpvys37fcgXTgfrqtAicIue4Irk=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBjkg0GMCfNtbA/GwLkBEyLC6YZRPO6XGvS3yhEunC8 nThM9hGJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCY5INBgAKCRAk1otyXVSH0HgHB/ 9Qz+YHYq8gXj+SDQwkxCPpO15XFqKYKfL7ZVaNXGEBFLxzYB2xd8jb5OK4qywKnWtCj+hRKj3qOqzK 39HQin1s3/gUXeJ0gtwmL3RQHX6CItgpPc2wPej7Jo7pnSJ3XKnF+d6ykRODWyjjRPTnn5qdeMO5U4 qcEmGqa95ns+HAr8JMqZnEuZkTrpGyJE7661lTBjX229FdpR8MMsJMHSKUK027uUGpR0ORKGOelFob 5Vq+Poy1CU9yy7KB0Yi3clgazNQLNv9MYHsqv6+AU4ZnnPbLzBFzthsm+mCsT/5J3qmXxDsMfBg802 4I28OPsR3ymb04ehJvOt2BSVO/xhL0 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-20221208_081305_976948_3D98AB8B X-CRM114-Status: GOOD ( 13.77 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now that all the ID registers we use have been converted to automatic register generation we can start to make use of the regular definitions we have for the registers and their bitfields to make the hwcap tables easier to write and review. This series does that, updating the macros used to generate the hwcaps to provide what should be clearer and less error prone specifications for the hwcaps. We move from specifying like this: HWCAP_CAP(SYS_ID_AA64PFR1_EL1, ID_AA64PFR1_EL1_BT_SHIFT, 4, FTR_UNSIGNED, ID_AA64PFR1_EL1_BT_IMP, CAP_HWCAP, KERNEL_HWCAP_BTI), to this: HWCAP_CAP(ID_AA64PFR1_EL1, BT, IMP, CAP_HWCAP, KERNEL_HWCAP_BTI), which is shorter due to having less duplicate information and makes it much harder to make an error like specifying the wrong field width or an invalid enumeration value since everything must be a constant defined for the sysreg and names are only typed once. I'm posting it now in the hope of getting some review before v6.2-rc1 comes around, changing this will cause dependency issues for any series adding new features so if we're going to do it it's probably helpful to get it merged relatively early. While doing this I found some errors which I have previously posted, I've rolled those fixes into this series for simplicity. To: Catalin Marinas To: Will Deacon Cc: Suzuki K Poulose Cc: James Morse Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Mark Brown --- Mark Brown (6): arm64/cpufeature: Fix field sign for DIT hwcap detection arm64/sysreg: Fix errors in 32 bit enumeration values arm64/sysreg: Allow enumerations to be declared as signed arm64/sysreg: Annotate signed enumerations arm64/cpufeature: Always use symbolic name for feature value in hwcaps arm64/cpufeature: Use helper macros to specify hwcaps arch/arm64/kernel/cpufeature.c | 181 +++++++++++++++++++--------------------- arch/arm64/tools/gen-sysreg.awk | 18 ++++ arch/arm64/tools/sysreg | 12 +-- 3 files changed, 111 insertions(+), 100 deletions(-) --- base-commit: 5f4c374760b031f06c69c2fdad1b0e981a1ad42f change-id: 20221207-arm64-sysreg-helpers-6734642b7fb9 Best regards, -- Mark Brown _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel