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 A1D0BC433EF for ; Wed, 16 Mar 2022 17:11:03 +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=hFCn+b9LICF47vSIKOf3IE0UBQADutv9ZLRVDFQfDXw=; b=z0L4wtyo+6BHtj ki6ocOXU1bdaSJC8gRB3Dtg5cwdqMIlARA41s/LlLHpxfJzZ/SdQ5rrbyOGfHR9/xKbrq4OpW8Tv6 lUiisYikv8zYy+lEY6nlsWO9hMPwTA6SwYAqStXF2beaoB+e1+QjmRT3J/yytQQfXoCXPpg/7EGUr PPRfJSiP/y0KkkNzZfdILS62TZNMD1kWPfk6rn4SYU7myaD9ETMINAxsyg5+NgK/0DH+l6s05j81V NuSGgB9/IiXDbg3VQ351unNYDsP2/+ugrOd3ZwAf2B9/qRaoCpksT2DMs3QZdNEGfZHlr8/UrHy6+ ERL8tTKTYa2aX4xCQcFg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUX9k-00DsCt-0P; Wed, 16 Mar 2022 17:09:52 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUX9B-00Ds4G-OT for linux-arm-kernel@lists.infradead.org; Wed, 16 Mar 2022 17:09:19 +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 dfw.source.kernel.org (Postfix) with ESMTPS id 44E2F61808; Wed, 16 Mar 2022 17:09:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9D43C340EE; Wed, 16 Mar 2022 17:09:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647450556; bh=2FGoFZEUlEbv06fmTRozHGIJlUR3Kh7pCWkXjzLqRno=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g5CFDu6KeADE6zjy0fqBOYLPFnuxjCljd38ZQfMXtu2nmtR/YHwe17GbSc7tiKTxm 2xXSPv7xPJWIKlV0jrYh3ZXuiKV4evTEYR0oo8L/go63/Zim9UcIcLIdwaPuOFbWka PO4HCBVDPjJUjWLa8WfpCyj4aaoCJPeK8OV1e6Osf9Zx0nxf/2sUHXmQCd3DBn4QS9 QiQW2xQ/t6vnFfsaBClZFf0LjKh+ERhyh3HFmN11gHjOCk+vA42+KjDuRTHzs+m2ge toZ25ve3PNikqJ3EezMa7lBogc9sDmka6USJMn1ORbRcXlQWVgvVwVo+nGrwEdFSfU /Uhxu/Ac9rHjw== From: Mark Brown To: Catalin Marinas , Will Deacon Cc: Mark Rutland , Marc Zyngier , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, Mark Brown Subject: [PATCH v2 4/9] arm64/sysreg: Provide a helper macro for defining sysreg bitmasks Date: Wed, 16 Mar 2022 17:08:44 +0000 Message-Id: <20220316170849.1183941-5-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220316170849.1183941-1-broonie@kernel.org> References: <20220316170849.1183941-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1157; h=from:subject; bh=2FGoFZEUlEbv06fmTRozHGIJlUR3Kh7pCWkXjzLqRno=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBiMhmZUFVXKtkytBe7saHn0Z5DKENku/uJlYXHFMEB l1bk80OJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYjIZmQAKCRAk1otyXVSH0COoCA CDfaTH/kdtxGvYoH8n5MJdFWZHKiWw9MDOThRi1KcaevzpStfL5ybWFExVmwG4FcB63lGnyc/N8gjR H2S9ydib0z+trLrhNELbWI1S20hlpoXHieRMHSUQlr09clYaVe5QxZjobU3sC+qP/5aS1FoaG6xyXm aa4dtbKNUkdpuiVivlw0SUDlalFkxqB9s9nuqCcRQyWFA+9adbanFW6e6O1ADknl8iFUw5+yyhOCD/ 41sOcBkgB72++lAgc9JD1D9sH89FvUrjxyVzd6G18LqReUEm3lyB1Gd1TiaNwuNT64aI7FNqi3DL9H oNKiJ2nr6NpDLsg64YnnRCv39TDseR 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-20220316_100917_870573_C689CC83 X-CRM114-Status: GOOD ( 12.74 ) 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 To ease the generation of headers for the bitfields in the system registers provide a macro for defining bitfields based on the top and bottom bit. Ideally this should be provided along with the generic BIT() macros however there are a bunch of existing places with such macros including some that actually call their macro BITMASK() so rather than create a dependency on a wider cleanup let's define something local for now, this can be improved later. This also sidesteps the need to consider types other than u64. Signed-off-by: Mark Brown --- arch/arm64/include/asm/sysreg.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index abb1e0502e28..fa2ae02de465 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -15,6 +15,8 @@ #include +#define ARM64_SYSREG_BITMASK(h, l) ((BIT(ULL(h)) - BIT(ULL(l))) | BIT(ULL(h))) + /* * ARMv8 ARM reserves the following encoding for system registers: * (Ref: ARMv8 ARM, Section: "System instruction class encoding overview", -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel