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 933AAC4332F for ; Wed, 2 Feb 2022 10:32:23 +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=XJ98yKYS7iv49091BNg4efu1EimY41qJoV/HIzck1Vo=; b=OO2zgXZClSdzgd ROyJCq/r8ejKGPD/BhBfXG/Cr835Q/EirXTNJsYLWEj9O25gDAbyFuTu6cGfo6leXWRzejspvP5wu pDFIudmUNyRWC4OvWNJSuMp+dL1zKbxTyoGe0Hp8gUHHOHhWgb68Bzk+Q7KPcojWtPzltp8WuFQ6V FirCxC6YpBdvPEaO1uGcjOJa9p3nwkiZF6pslW+nOW2H3CkYA2muD3ZCg4Q1XJuKP0pVbzgaKL5Ig 2rtmwMCQnx6PR+yfWTg/RxQ35mlkdvagQ7jOhPEHT79vldLY+I7Af6b1vPfxeumlUzQbzHQeS9CY0 GWRneUik3ahG+/qXyobw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFCum-00EuQh-GZ; Wed, 02 Feb 2022 10:31:04 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFCui-00EuPx-OZ for linux-arm-kernel@lists.infradead.org; Wed, 02 Feb 2022 10:31:02 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B017F1FB; Wed, 2 Feb 2022 02:30:59 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.87.240]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1CDD43F40C; Wed, 2 Feb 2022 02:30:58 -0800 (PST) Date: Wed, 2 Feb 2022 10:30:52 +0000 From: Mark Rutland To: Mark Brown Cc: linux-arm-kernel@lists.infradead.org Subject: Re: [boot-wrapper PATCH 2/2] aarch64: Enable use of SME by EL2 and below Message-ID: References: <20220201172132.2399026-1-broonie@kernel.org> <20220201172132.2399026-2-broonie@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220202_023100_870550_184DE7FA X-CRM114-Status: GOOD ( 18.97 ) 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 Tue, Feb 01, 2022 at 06:22:59PM +0000, Mark Brown wrote: > On Tue, Feb 01, 2022 at 06:16:58PM +0000, Mark Rutland wrote: > > On Tue, Feb 01, 2022 at 05:21:32PM +0000, broonie@kernel.org wrote: > > > > +#define ID_AA64SMFR0_EL1 s3_0_c0_c4_5 > > > +#define ID_AA64SMFR0_EL1_FA64 (1UL << 63) > > > For consistency with the other ID fields, I'm going to make this: > > > #define ID_AA64SMFR0_EL1_FA64 BIT(63) > > > In future I'd like to split the remaining definitions using shifted bits into > > separate _ and __ definitions (or > > something of that rought shape) so that field boundaries are always explicit, > > but those can stay as-is for now. > > Sure. I was quite confused about the idioms for the use of BIT() in > this header since it's used for for example both ID registers and SCR > but things like the various SPSR and CPTR defines use shifts, it'd > probably be good to just use BIT() throughout. I generally agree, and sorry that this is a bit of a mess at present! I'd held off converting everything to BIT() because I had planned to convert multi-bit fields at the same time with some helper macros that I've dropped for now to clearly separate the concept of a field of bits from the values that field may contain. For example, CURRENTEL_EL2 is (1 << 2), and shouldn't be converted to BIT(2), because it is a 2-bit value 0b10 in the field bits[3:2]. That said, I'd be happy to convert all the true single-bit fields to BIT() now. Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel