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 DF06CC7619A for ; Mon, 27 Mar 2023 12:23:16 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RhnnHnpmYA7rzanJ6mLPhC26IhQNAj8LGVVWt/FU+AQ=; b=sCJV+jnbaFyMPx r6jR32o+QQ/4THW4RadZrKddh1GalFGiYrHDdK7gTaUKiuZJIEPWoOiNRCNCktGKglRremHvXt66w oaqTkCnKLSraG8fC9lYD834LTdjcw/uwMYTZKn/3VgtH16uiSagl8X63Hm0cjSzG1KHR43H2J2Knm yp2JJv1McbeNTV/u0ZHh5oInf8UKEpWW8r+NtBzyQSvy/P3/t/9GkswKQXXAorRdpAtRx8gSRib4K sXFQ/S5Lujp7mN6NqJ8qkWoz+5L3WR6yaCV7XMr3yrFBiPZ/avHG3Snb9PEWnD84kWlmP3En52FHz IoqLBSNh79QK4ykoAJkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pglrh-00Avms-13; Mon, 27 Mar 2023 12:22:21 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pglre-00AvkY-2K for linux-arm-kernel@lists.infradead.org; Mon, 27 Mar 2023 12:22:20 +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 A2C16611F2; Mon, 27 Mar 2023 12:22:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D07DC433EF; Mon, 27 Mar 2023 12:22:14 +0000 (UTC) Date: Mon, 27 Mar 2023 13:22:12 +0100 From: Catalin Marinas To: Mark Brown Cc: Joey Gouly , linux-arm-kernel@lists.infradead.org, nd@arm.com, james.morse@arm.com, mark.rutland@arm.com, maz@kernel.org, oliver.upton@linux.dev, suzuki.poulose@arm.com, will@kernel.org, yuzenghui@huawei.com Subject: Re: [PATCH v1 05/18] arm64/sysreg: add PIR*_ELx registers Message-ID: References: <20230309145246.22787-1-joey.gouly@arm.com> <20230309145246.22787-6-joey.gouly@arm.com> <97d3f080-ebae-45c1-9871-2d99c57b81cd@sirena.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <97d3f080-ebae-45c1-9871-2d99c57b81cd@sirena.org.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230327_052218_798965_41AB17A7 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 On Thu, Mar 16, 2023 at 05:23:48PM +0000, Mark Brown wrote: > On Thu, Mar 09, 2023 at 02:52:33PM +0000, Joey Gouly wrote: > > > +#define PIE_NONE_O 0x0 > > +#define PIE_R_O 0x1 > > +#define PIE_X_O 0x2 > > +#define PIE_RX_O 0x3 > > +#define PIE_RW_O 0x5 > > +#define PIE_RWnX_O 0x6 > > +#define PIE_RWX_O 0x7 > > +#define PIE_R 0x8 > > +#define PIE_GCS 0x9 > > +#define PIE_RX 0xa > > +#define PIE_RW 0xc > > +#define PIE_RWX 0xe > > > +#define PIRx_ELx_PERMIDX(perm, idx) ((perm) << ((idx) * 4)) > > This is bikeshedding but every time I look at the uses of this macro I > find myself trying to read it as index, permission rather than the way > it is - that's the order for both assignment statements and #defines in > headers so it's what my brain is reaching for. You are right, we should probably drop the IDX suffix (or maybe you have better suggestion for naming it). It refers to the permission field in the PIR* registers. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel