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 244DBC4167B for ; Sun, 18 Dec 2022 11:32:18 +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: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+2/8+vUueCGk956GQjpUl7WPOC5Vide0ciP/II46VAs=; b=bvPcQ4W9ufX67V yyx9ttpANTPRzPHVSSRvfm5iBwoAucx5iafvFwjJ7fETSdXcsVNrj2iVlB2zH6fmClEGoSVZrdrhE 9BDQIiVMXNhKqdFbDtAIjgJI/ALa0aZUcDM4zndGeyeA2JKiepbDoLCAe5dexGArEUb11lYmTUg7f f1xvAvR0EC8bZLOKFig4DthbDEvY5rRJU8su06u+UoYrNwisZHXk+O2MRiJoww+34U6bxQPml0vsk Zvn0Kenbk85RDAxY5Jy3CnMMtqrl6SD9dbQSnfXEMFLUHtc3G1l03BTtGfckUCJEpGu4QlpB+q6tg 5d/23UnVLw26vHpng2rw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p6rqV-000stQ-Ej; Sun, 18 Dec 2022 11:28:43 +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 1p6rnH-000sB6-GH for linux-arm-kernel@lists.infradead.org; Sun, 18 Dec 2022 11:25:24 +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 ED64960C83; Sun, 18 Dec 2022 11:25:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35A4AC433D2; Sun, 18 Dec 2022 11:25:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671362713; bh=wwgGeYny5f5AHk6ZOFRk76mpsA6gB8yKbtwbzFis2D4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lS2C7AoRG3nj2J4y1kkvbi+n/qBlaxvkTKu8j4LjDwru3o9jVHtYmgCOlQUHNuC/X d8GI+zFjL4Lg1qBdZC2QHMnpNvFEoW0aB4AAog+UYfc8jbilz4AO89pwsqvlJrDkhc A2+FHKtUt2c7eozkbepsxsQv1kgETRmesY0rqGEWJhe5JW0kz5izGqFThoUGjYq1o4 QYDdBYanIT1ksd48vPU76CU/bAkdm7+MAY1B0GpfoBo4RA6F5wyMZaskMddwlztLlh ycV9NQowizGvCpZp5PXqgDgwTIDjH3M00/oeybpmo7JDZwiRW/r9IDH6yC9+J7p0wu UW7mcJe84CG0w== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1p6rn4-00DQUS-Nx; Sun, 18 Dec 2022 11:25:10 +0000 Date: Sun, 18 Dec 2022 11:23:41 +0000 Message-ID: <87cz8hez0i.wl-maz@kernel.org> From: Marc Zyngier To: Akihiko Odaki Cc: linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, Mathieu Poirier , Oliver Upton , Suzuki K Poulose , Alexandru Elisei , James Morse , Will Deacon , Catalin Marinas , asahi@lists.linux.dev, Alyssa Rosenzweig , Sven Peter , Hector Martin Subject: Re: [PATCH v3 1/7] arm64/sysreg: Convert CCSIDR_EL1 to automatic generation In-Reply-To: <20221218051412.384657-2-akihiko.odaki@daynix.com> References: <20221218051412.384657-1-akihiko.odaki@daynix.com> <20221218051412.384657-2-akihiko.odaki@daynix.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: akihiko.odaki@daynix.com, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, mathieu.poirier@linaro.org, oliver.upton@linux.dev, suzuki.poulose@arm.com, alexandru.elisei@arm.com, james.morse@arm.com, will@kernel.org, catalin.marinas@arm.com, asahi@lists.linux.dev, alyssa@rosenzweig.io, sven@svenpeter.dev, marcan@marcan.st X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221218_032523_667834_F80D9445 X-CRM114-Status: GOOD ( 23.13 ) 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 Sun, 18 Dec 2022 05:14:06 +0000, Akihiko Odaki wrote: > > Convert CCSIDR_EL1 to automatic generation as per DDI0487I.a. The field > definition is for case when FEAT_CCIDX is not implemented. Fields WT, > WB, RA and WA are defined as per A.j since they are now reserved and > may have UNKNOWN values in I.a, which the file format cannot represent. > > Signed-off-by: Akihiko Odaki > --- > arch/arm64/include/asm/sysreg.h | 1 - > arch/arm64/tools/sysreg | 11 +++++++++++ > 2 files changed, 11 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h > index 7d301700d1a9..910e960661d3 100644 > --- a/arch/arm64/include/asm/sysreg.h > +++ b/arch/arm64/include/asm/sysreg.h > @@ -425,7 +425,6 @@ > > #define SYS_CNTKCTL_EL1 sys_reg(3, 0, 14, 1, 0) > > -#define SYS_CCSIDR_EL1 sys_reg(3, 1, 0, 0, 0) > #define SYS_AIDR_EL1 sys_reg(3, 1, 0, 0, 7) > > #define SYS_RNDR_EL0 sys_reg(3, 3, 2, 4, 0) > diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg > index 384757a7eda9..acc79b5ccf92 100644 > --- a/arch/arm64/tools/sysreg > +++ b/arch/arm64/tools/sysreg > @@ -871,6 +871,17 @@ Sysreg SCXTNUM_EL1 3 0 13 0 7 > Field 63:0 SoftwareContextNumber > EndSysreg > > +Sysreg CCSIDR_EL1 3 1 0 0 0 > +Res0 63:32 > +Field 31:31 WT > +Field 30:30 WB > +Field 29:29 RA > +Field 28:28 WA For fields described as a single bit, the tool supports simply indicating the bit number (28 rather than 28:28). However, I strongly recommend against describing fields that have been dropped from the architecture. This only happens when these fields are never used by any implementation, so describing them is at best useless. > +Field 27:13 NumSets > +Field 12:3 Associavity > +Field 2:0 LineSize > +EndSysreg > + I don't think we have a good solution for overlapping fields that depend on other factors, either contextual (such as a mode that changes the layout of a sysreg), or architecture warts such as FEAT_CCIDX (which changes the layout of a well-known sysreg). At least, put a comment here that indicates the context of the description. Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel