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 4C83DC433F5 for ; Thu, 27 Jan 2022 18:56:33 +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-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-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hsez0UWIBfKZPhF+EpU077O34lYFDvA0FA4EssXtVlc=; b=Epab3NBBJD+tTqDGRncEgym7uJ W8KdjLcj07msk3yAwE9Ex4kCO4+FY389VNFIs6HvVwawips3NfF+36DE7ZlJv8+tObAHrg9vUZoMD C/O42+wpaDPudKJW4DA6kSgxV5tNNZ+ZmeJaqdvlvLD9G8FJk2IRYQPtECnYf+2zitEK5VMLyMXvh sNBKIEe739+2FTFkZQwkI9lIZJY4+KYEhKu3sFOgix0q9T5LzfWAgjO3iaWNqiEwwMfTQc/X0dohr 6zod3el5E2aKb5yIg3WVIXDqTnxArX2kuY3/ahEKD7IoMhayQgsoKHW/PncCjXEgGQubqKrEOrroG 2X8hlUBQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nD9vL-00GsXN-Sj; Thu, 27 Jan 2022 18:55:12 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nD9vI-00GsWq-C5 for linux-arm-kernel@lists.infradead.org; Thu, 27 Jan 2022 18:55:10 +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 4ADD0B8234A; Thu, 27 Jan 2022 18:55:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70B23C340E4; Thu, 27 Jan 2022 18:55:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643309705; bh=/gNBA7OBhXxSmCiGVC2GaaVZFU00qkBDyPUFomsB8hI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WG+fIO4YfHDcTN+e59vAKhxmnuMb5xe4Fgo4GXPg5+st5yW1Nf7eJsdOg49wXpGu7 DhtdMr+9nXGnKtbwPDJRsQIXK0o6fvmm+HSdYK0tKvtWPTIc3v+K5+fHTO1DdVUaOf HBiSoGAKutioRbi5knKEttAUhK1aA+2LcncDCHIfO/eAEznAQmbvPK4bDa5Zq8qdY/ m1wO7RRYyi4SSh17hUjMeUfq3j+yMK+x1pFdA3rCO0TDolsX1H/WBFhxD7LUV2vVX4 CAal2czK1jm8NeDZCZtz2fitcC/CvcqilD93XmnhnwOcyXIoFty1rDqQThG3sxwlTt FRhWMCha/hi7g== Date: Thu, 27 Jan 2022 18:55:00 +0000 From: Mark Brown To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, andre.przywara@arm.com, jaxson.han@arm.com, robin.murphy@arm.com, vladimir.murzin@arm.com, wei.chen@arm.com Subject: Re: [bootwrapper PATCH v3 01/15] aarch64: correct ZCR_EL3.LEN initialization Message-ID: References: <20220125150057.3936090-1-mark.rutland@arm.com> <20220125150057.3936090-2-mark.rutland@arm.com> MIME-Version: 1.0 In-Reply-To: X-Cookie: Stay on the trail. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220127_105508_749250_D5AB7C33 X-CRM114-Status: GOOD ( 26.36 ) 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: multipart/mixed; boundary="===============6906398016466135890==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============6906398016466135890== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="9qR1JKJwbrQFN7B0" Content-Disposition: inline --9qR1JKJwbrQFN7B0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jan 27, 2022 at 04:08:50PM +0000, Mark Rutland wrote: > On Tue, Jan 25, 2022 at 05:44:47PM +0000, Mark Brown wrote: > > On Tue, Jan 25, 2022 at 04:33:39PM +0000, Mark Rutland wrote: > > > On Tue, Jan 25, 2022 at 03:59:38PM +0000, Mark Brown wrote: > > > a) Use __ definition, as here. > > > b) Use __MASK, and add comments at each usage as to why we use > > > a mask as a value, to explain why that isn't a bug. > > > c) Have both __MASK and some value definition, and use some > > > insertion helper to insert the value. > > > ... and I went with (a) because it was the simplest. > > > Is there a problem with this? > > My concern is continuity of the enumeration algorithm between the > > various implementations we have, it's something we're not currently > > great with and this creates a separation between the kernel and the boot > > wrapper implementations. There's no change in what's actually being > > done but it creates some additional effort to figure out why we're > > setting a maximum here and not trying to set all the bits as we do in > > the kernel. > TBH, I'd argue if we're setting those bits in the kernel it's probably a bug, > because we don't know *exactly* what effect they'll have when allocated in the > future. My comments there are related purely to the renaming of the constant, not to the narrowing of the bitmask which is less of an issue. Basically avoiding the question "why is that a maximum and not a mask" and if there's limits on the valid values that are more restrictive than the representable values. The ideal thing for the boot wrapper would be option (c) with either a configuration option to set the maximum to something lower than all bits, unless someone was unduly enthusiastic and wanted to have an all CPUs enumeration algorithm, but both are probably more trouble than it's worth. --9qR1JKJwbrQFN7B0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmHy6oMACgkQJNaLcl1U h9BTqAf/WMaOULF+LbbnFaUsyEmDg1e/0ggNWyL51xivvIFcMg9B+JqMYIhmsb/6 s8siKa5p4EODvBnL4FDFQdlpC3tZUWu7HMm6Rvj0DDxHEYNdVwWmWlfeB7wFM+pZ s62RY86WSCfKkdz+RsXc5Kl+tu7GDicGnRAfdcyU+zLueR4Wpcs6uOFqPVed3JqK sJFuBHEmKxs4TDuY5egBq2ef78LYHgVfsjcyNWDa+ida7JTIultpfpfBoHsiId/q kWcGZQwNaBzvnLungKgPJfnGXXRmwmr8GVNff9Is8YJTocVUKC9oz7pGIlvxEO5U cJCX1hmfDkl2nj6YQlxOHGm+NYV37w== =n3si -----END PGP SIGNATURE----- --9qR1JKJwbrQFN7B0-- --===============6906398016466135890== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============6906398016466135890==--