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 065D7C43334 for ; Thu, 9 Jun 2022 17:11:00 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ktFzEn9jWvF424dLptmTuq3jPSJn0SzNJLYfA35hH0c=; b=h8BSVEjH327njH xu9hMWzwRBph6MpjoUr3FQNW1sD/mm0YEUiOsW+eMv14Nm51SuI79iMtQuAdQe+9Ixet2LK0yca5K F2HKgGltvWVLf2t669tg7r+teKe8OmStxXz0aRl1rCNDhHCwUoDmOTtIoj3EAZ1/k0O2fgKCp57zm 6k6FT33PpLsptkwPKjpuk0TXLgB6k0PCWSklWjbGr+QpRxd47fu23TumXsHIx0UJhDW58bI4CvWvh raN9swGC40OBidq1alnHMb67/mTPuvl/eYRoQq9wFYAFVseNEl9K4nuKr7pTjgnNHV21QU7KW6vVf 6kualhmuu2IH9RIYEieg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzLfO-002ziM-CJ; Thu, 09 Jun 2022 17:09:54 +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 1nzLer-002zS4-3u for linux-arm-kernel@lists.infradead.org; Thu, 09 Jun 2022 17:09:22 +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 DB8FFB82E0A; Thu, 9 Jun 2022 17:09:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46D3DC3411B; Thu, 9 Jun 2022 17:09:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654794558; bh=2/YcaFBMXhItOKk5qQdrya7+piGFgYXucx4zDLzdjZc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dg/sVDmv1htAfDhweuSDzqCnMlnBzv4y8pUD4LZ9Wa2Bn44j79UF7SbdEO1dk3nR9 HaxXj1rqSnwDtkOczAsF6vq4WwJD0LL1a4Khp/ci+ggrOsZ/T7ZsqorC/qmLNuhSP3 pW1ZXONOu6rMIL9OVJAVNllk5NLA1iyYsmMBdYi2lOe4oo6aBVWTyvC3D7HOYV7b/F MGTkD9GsO531e0nF+ncf66znnjyOjgIDAHFAdiMCoInnW4Ivsl2EdzaSTF544zF3IA 1c64lToGycwvbBd1hd9beQTzTtQAs+d7m1BgKGmUzeTqQ9Ms3kxQme9Il65RcLbXhH rmoe0PV0sLVtw== From: Mark Brown To: Catalin Marinas , Will Deacon Cc: Mark Rutland , Joey Gouly , linux-arm-kernel@lists.infradead.org, Mark Brown Subject: [PATCH v3 03/26] arm64/sysreg: Add SYS_FIELD_GET() helper Date: Thu, 9 Jun 2022 18:08:37 +0100 Message-Id: <20220609170900.1641343-4-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220609170900.1641343-1-broonie@kernel.org> References: <20220609170900.1641343-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=776; h=from:subject; bh=2/YcaFBMXhItOKk5qQdrya7+piGFgYXucx4zDLzdjZc=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBioikYOwVtgiafnDBd6ru187u/iknQv3P+UAymvYmK nctJO62JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYqIpGAAKCRAk1otyXVSH0EGuB/ 9DYpxCFl/QjINvk7BVsH2ilE8BulfS3WphpfsbnmshtsxGFLag6AOYVEmbrRMHW9MlzHH6aghTxygg Z/+fPmOJg0Rfs996MLWlU4pDCjdSmQ5yL+SnSZB4a4Uto39RFPAowdg1VgrE5FO3CSDEg5/Alves7C qIfeyg+jt9NqtUeFZQEk//lZJCBFltgJJb7o/HOvotKyEzgtCVvq8aWIpgXRUYyiYnK7FQ9a7fakqb 9U+OXSht71hWBaBFFaRcdbwTn/jB9yVsX6/Ew24nwlo1Md/BaSX+kysGHCpOzaXv6QAun0tGZoHLpV WgpnAajHxD7UmVWSqvXpOm0hF8LnKH 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-20220609_100921_317005_FF4C6EB7 X-CRM114-Status: GOOD ( 11.10 ) 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 Add a SYS_FIELD_GET() helper to match SYS_FIELD_PREP(), providing a simplified interface to FIELD_GET() when using the generated defines with standardized naming. Signed-off-by: Mark Brown Acked-by: Mark Rutland --- arch/arm64/include/asm/sysreg.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index 6c7be1a2114b..0f5771ac5b94 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -1326,6 +1326,9 @@ #endif +#define SYS_FIELD_GET(reg, field, val) \ + FIELD_GET(reg##_##field##_MASK, val) + #define SYS_FIELD_PREP(reg, field, val) \ FIELD_PREP(reg##_##field##_MASK, val) -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel