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 9B810C433F5 for ; Thu, 21 Apr 2022 15:47:58 +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=YSHLN4eDC6+urBEpCabGd5cV3Jjw6iH4bZhB+qu5EDg=; b=npy8KRLWCuTFeSljx2SYIiY0GS sAJpHlbcoV1W9Sn6Id+7WB7LPtJy42Ju/CNXmf7m8BUSQtr7MtH9VwKaXJzFkNTfdcbfD+lZl7vZv zZplh6GcL2nzjfXHLl5sfVcCSgNsQPjPpeWJAeeaMaZpFy8jUOHTUAt9JlDqnULpeJHcLTbp0QAw/ 6HYOOCivpx5S2ZqAJRK8q36o0DzeC/+9fCCVlixj38/SmldQ8HCeqlHoUZ23GE5sNtqSrS2OGen/u ezgG+lWYIAWGz+bz1cMiVywm/AArQp6KzIWjSCHoA3+/0IHjFLbJJl6VxM0d+IbN3K4oRw47VCQzV U9QU+6Ww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhZ1H-00E5vq-6q; Thu, 21 Apr 2022 15:46:59 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhZ1D-00E5ul-Gj for linux-arm-kernel@lists.infradead.org; Thu, 21 Apr 2022 15:46:56 +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 C62F561CC0; Thu, 21 Apr 2022 15:46:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA1FFC385A5; Thu, 21 Apr 2022 15:46:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650556014; bh=rYzdUJcIE1Lmd3ITJCXweagNSLvJvBWJrcYM0PBbEhQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PCWroZQ0pYwB7J4J9fpntZ6nLK5k1i4YdDKlO0ElaYGPy2aF0TK7lFGjqaYhBawcs xR3uU5c4sNOk7R4pS0liniMiQf7OkfxBA4Mu3cJ7SqvaDdoebQeMHCy7dO1Zjy4ie3 pfRTVAHTeF73s1s7D/hP7vo/RkrybFvDaY2USHPlKRKLn6Vnhmrgh2/y/MwEsqGEmt vh+2uZP12Y2mbNkdE4CYMF4/NfoxvEs3qsEkO4KGI+BKXZPREaL1VApuHI1XE1/pw7 MScDWl78jVmaTm9n1eO5PaWXClqLaP+xgh0Nfy2UqzZk9Qwka+l8ZkKGQgSs5Mhk49 3/Gqticgznvxg== Date: Thu, 21 Apr 2022 16:46:49 +0100 From: Mark Brown To: Mark Rutland Cc: Catalin Marinas , Will Deacon , Marc Zyngier , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v4 4/8] arm64: Add sysreg header generation scripting Message-ID: References: <20220419104329.188489-1-broonie@kernel.org> <20220419104329.188489-5-broonie@kernel.org> MIME-Version: 1.0 In-Reply-To: X-Cookie: Two percent of zero is almost nothing. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220421_084655_668350_17FE5DF3 X-CRM114-Status: GOOD ( 29.58 ) 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="===============8677812308625895115==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============8677812308625895115== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="2SgFx5oU66hKpstv" Content-Disposition: inline --2SgFx5oU66hKpstv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 21, 2022 at 04:35:14PM +0100, Mark Rutland wrote: > On Thu, Apr 21, 2022 at 03:50:41PM +0100, Mark Brown wrote: > > Until we need it that can just be equivalent to a comment, ready to kick > > in once someone needs it. I can update the existing (trivial but meh) > > TTBRn register conversion to do that. > FWIW, I'm happy either way (i.e. TTBRn to staty as-is, or be converted), > given the duplication is trivial. Yes, I don't think it's particularly *useful* to do this for TTBRn, but it does demonstrate the mechanism which can then be applied to other more interesting registers. > > I was talking about a completely different issue, things like CPTR_EL2 > > where the register layout changes depending on some runtime > > configuration. You'd need two separate register layouts within a single > > Sysreg which isn't too bad until you get to the point of having to name > > things like RES0/RES1 and any name collisons in fields (I don't *think* > > we have name collisons...). > I understood that was a distinct problem; what I was suggesting is the > same mechanism might help there, as e.g. it would allow us to do: > # Creates CPTR_EL2__E2H1_RES0, etc > SysregFields CPTR_EL2__E2H1 > Comment "CPTR_EL2 layout when HCR_EL2.E2H =3D=3D 1" > ... > EndSysregFields =2E.. > ... or where we have two names for the same register encoding (which is > really silly, but does exist): Right, that'd work but it has the disadvantage that we can't then blindly use CPTR_EL2_ZEN_MASK or whatever. That might be fine, it's a small number of registers and could help someone spot being in the wrong mode, but perhaps not. The alternative is to teach the script about multiple layouts for a single register. I don't have a particularly strong opinion there, and I think it's reasonable to punt until converting the affected registers so people can look at concrete suggestions and their impact on the relevant code. > Sysreg ICV_EOIR0_EL1 3 0 12 8 1 > Comment "See ICx_EOIR0_EL1_*" > NoFields > EndSysreg >=20 > Sysreg ICH_EOIR0_EL1 3 0 12 8 1 > Comment "See ICx_EOIR0_EL1_*" > NoFields > EndSysreg >=20 > SysregFields ICx_EOIR0_EL1 > Comment "Shared layout for ICV_EOIR0_EL1 and ICH_EOIR0_EL1" > Res0 63:24 > Field 23:0 INTID > EndSysregFields > I can believe there are problems with that, and/or maybe it's too ugly. TBH that seems fine to me, at the level of generating the defines it's just a shared layout. --2SgFx5oU66hKpstv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmJhfGgACgkQJNaLcl1U h9Bsdgf/Tuho7RE/mHy58uiKGi2Ccsx+oZxiLRu3zaLo9u51YC7q0tM/0X2SVbbS t2HFmFKaKtRgxaxfWqEkgjZNKB4b1yxRQo4wY0pgb5j4pbmA17BRt2b0OhQNFkKl mA/W1goxFAJurLW6A0Jmh8gke7jNIaZVNoC94SfWAoT3NqD1IHiVp22wxYYlmD0j trWigpqWL/bBHePHZtRhSL0swFP2giPoOIr56QRz6PWQZs4CAbJrCtLGYhBL2VKQ 6yuXdA5+bN6KrzSGgO68j8vA11bW07Zv+CTeqeUZKwebQw8Sfl2EPCgTUbHBGImW /5+3y3Xztr1udtiQB+Ae1J7Gu/8nbg== =b5vI -----END PGP SIGNATURE----- --2SgFx5oU66hKpstv-- --===============8677812308625895115== 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 --===============8677812308625895115==--