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 D8613C433FE for ; Thu, 21 Apr 2022 09:53:55 +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=Vy0aDPJWilaWLSYngfKWmy/G7aixGYuOQc2Q06/9lKk=; b=SHO8Xn6KEYDj/E po341gwYokn+h68doiKefpb5vycCwQrpenus6WWus+E6j5EIIJhlxql3HpX51DA90znCyax0LyED8 bL0Y17ijWb4fazFleeBA11kfAhE4wqeStBvOjaGvGu5TzbwSbGpTxne+5tltGSfiWhfdAnaddVnQg KCu9Vfv+yP1hh72Bvwnnt1aPto6Tcbz5Z22P9CRY/RCHGe2n8FlQ26/7QXbPcG0qk8e9+jJFQT9C5 JqeHu85Ch0JsKv2x6g2W7MsGsuaHfH7mQtzTvq59nXaZcJd+Oni/BRfOvjdpU4GKVU7UmRy1mGpKP yibKGS5HW9p1INmFictw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhTUf-00Ctwc-TA; Thu, 21 Apr 2022 09:52:58 +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 1nhTUc-00CtvA-JS for linux-arm-kernel@lists.infradead.org; Thu, 21 Apr 2022 09:52:56 +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 2585A1477; Thu, 21 Apr 2022 02:52:53 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.76.146]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 019E83F766; Thu, 21 Apr 2022 02:52:51 -0700 (PDT) Date: Thu, 21 Apr 2022 10:52:47 +0100 From: Mark Rutland To: Mark Brown Cc: Catalin Marinas , Will Deacon , Marc Zyngier , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v4 5/8] arm64/sysreg: Enable automatic generation of system register definitions Message-ID: References: <20220419104329.188489-1-broonie@kernel.org> <20220419104329.188489-6-broonie@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220419104329.188489-6-broonie@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220421_025254_760152_26E9D28C X-CRM114-Status: GOOD ( 24.05 ) 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, Apr 19, 2022 at 11:43:26AM +0100, Mark Brown wrote: > Now that we have a script for generating system registers hook it up to the > build system similarly to cpucaps. Since we don't currently have any actual > register information in the input file this should produce no change in the > built kernel. For ease of review the register information will be converted > in separate patches. > > Signed-off-by: Mark Brown > --- > arch/arm64/include/asm/Kbuild | 1 + > arch/arm64/include/asm/sysreg.h | 8 ++++++++ > arch/arm64/tools/Makefile | 8 +++++++- > 3 files changed, 16 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild > index 345fe98605ba..1eac9aa6fa2e 100644 > --- a/arch/arm64/include/asm/Kbuild > +++ b/arch/arm64/include/asm/Kbuild > @@ -7,3 +7,4 @@ generic-y += parport.h > generic-y += user.h > > generated-y += cpucaps.h > +generated-y += sysreg-gen.h > diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h > index f300c49d6281..11bf3636c741 100644 > --- a/arch/arm64/include/asm/sysreg.h > +++ b/arch/arm64/include/asm/sysreg.h > @@ -114,6 +114,14 @@ > #define SYS_DC_CSW sys_insn(1, 0, 7, 10, 2) > #define SYS_DC_CISW sys_insn(1, 0, 7, 14, 2) > > +/* > + * Automatically generated definitions for system registers, the > + * manual encodings below are in the process of being converted to > + * come from here. The header relies on the definition of sys_reg() > + * earlier in this file. > + */ > +#include "asm/sysreg-gen.h" Super trivial, but could we name that something like sysreg-defs.h? The fact it's generated is implciit in it being placed under include/generated/asm/. Otherwise, this looks good to me; my only vague concern is that as we add more sysregs generating the header might take a while (which was a problem for the atomic scripting, but not for the cpucap generation), so that's somethign to keep an eye on as we convert more definitions over. Regardless: Acked-by: Mark Rutland Thanks, Mark. > + > /* > * System registers, organised loosely by encoding but grouped together > * where the architected name contains an index. e.g. ID_MMFR_EL1. > diff --git a/arch/arm64/tools/Makefile b/arch/arm64/tools/Makefile > index cf1307188150..8d2d38858a0d 100644 > --- a/arch/arm64/tools/Makefile > +++ b/arch/arm64/tools/Makefile > @@ -3,7 +3,7 @@ > gen := arch/$(ARCH)/include/generated > kapi := $(gen)/asm > > -kapi-hdrs-y := $(kapi)/cpucaps.h > +kapi-hdrs-y := $(kapi)/cpucaps.h $(kapi)/sysreg-gen.h > > targets += $(addprefix ../../../, $(kapi-hdrs-y)) > > @@ -14,5 +14,11 @@ kapi: $(kapi-hdrs-y) > quiet_cmd_gen_cpucaps = GEN $@ > cmd_gen_cpucaps = mkdir -p $(dir $@); $(AWK) -f $(real-prereqs) > $@ > > +quiet_cmd_gen_sysreg = GEN $@ > + cmd_gen_sysreg = mkdir -p $(dir $@); $(AWK) -f $(real-prereqs) > $@ > + > $(kapi)/cpucaps.h: $(src)/gen-cpucaps.awk $(src)/cpucaps FORCE > $(call if_changed,gen_cpucaps) > + > +$(kapi)/sysreg-gen.h: $(src)/gen-sysreg.awk $(src)/sysreg FORCE > + $(call if_changed,gen_sysreg) > -- > 2.30.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel