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 0AE30E9370C for ; Thu, 5 Oct 2023 12:30:21 +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=UGYzagXxxG5t2z+KXod8+RiwIACnJDQn2x8DYS6PVyw=; b=1wOl+JKMCM1jX/ JzV6oQ6sHFdgCIhPnfcba9oi1VGtzZiW+EVo/yRE+2ypfPK+Tb503d6aYT4Zabi2trnetmzmxt52C S+LdMvN6sXfuTkNPxkZM+clVO/0iZLcpqMsmRGChI8AAED9jSSmAlgk40bH4Bdway0iLaRRq/48WP 8iOQ3t+0RWEQdlHCS9jPqQ9XixM3ZrHenz01p+Dh55KJui0ay9cPJLfWs9+kZ0XIMd+5RTS2oVqcT cUsPwplR6O5tqf4XpstRyCgSRgBC/YilXB6tR8PK4HBB5gwDlkVPdW5rxdRXJuy4Ars+a9SAfcX3Q haWJSa877EJyeQHx4sIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qoNUF-002oup-0W; Thu, 05 Oct 2023 12:29:51 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qoNUB-002ony-0J for linux-arm-kernel@lists.infradead.org; Thu, 05 Oct 2023 12:29:49 +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 A05B212FC; Thu, 5 Oct 2023 05:30:15 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E82F73F59C; Thu, 5 Oct 2023 05:29:33 -0700 (PDT) Date: Thu, 5 Oct 2023 13:29:30 +0100 From: Mark Rutland To: linux-arm-kernel@lists.infradead.org Cc: ardb@kernel.org, bertrand.marquis@arm.com, boris.ostrovsky@oracle.com, broonie@kernel.org, catalin.marinas@arm.com, daniel.lezcano@linaro.org, james.morse@arm.com, jgross@suse.com, kristina.martsenko@arm.com, maz@kernel.org, oliver.upton@linux.dev, pcc@google.com, sstabellini@kernel.org, suzuki.poulose@arm.com, tglx@linutronix.de, vladimir.murzin@arm.com, will@kernel.org Subject: Re: [PATCH v2 03/38] arm64: Factor out cpucap definitions Message-ID: References: <20231005095025.1872048-1-mark.rutland@arm.com> <20231005095025.1872048-4-mark.rutland@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231005095025.1872048-4-mark.rutland@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231005_052947_232943_8987C851 X-CRM114-Status: GOOD ( 25.29 ) 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 Thu, Oct 05, 2023 at 10:49:49AM +0100, Mark Rutland wrote: > For clarity it would be nice to factor cpucap manipulation out of > , and the obvious place would be , but > this will clash somewhat with . > > Rename to , > matching what we do for , and introduce a > new which includes the generated header. > > Subsequent patches will fill out . > > There should be no functional change as a result of this patch. > > Signed-off-by: Mark Rutland > Cc: Marc Zyngier > Cc: Mark Brown > Cc: Suzuki K Poulose > Cc: Will Deacon > --- > arch/arm64/include/asm/cpucaps.h | 8 ++++++++ > arch/arm64/tools/Makefile | 4 ++-- > arch/arm64/tools/gen-cpucaps.awk | 6 +++--- > 3 files changed, 13 insertions(+), 5 deletions(-) > create mode 100644 arch/arm64/include/asm/cpucaps.h I've just realised that I forgot to update arch/arm64/include/asm/Kbuild, and as-is this will cause cpucap-defs.h to be removed and regenerated on every subsequent build, which isn't desirable. I'll fold in the below for v3 to fix that: | diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild | index 5c8ee5a541d20..4b6d2d52053e4 100644 | --- a/arch/arm64/include/asm/Kbuild | +++ b/arch/arm64/include/asm/Kbuild | @@ -6,5 +6,5 @@ generic-y += qspinlock.h | generic-y += parport.h | generic-y += user.h | | -generated-y += cpucaps.h | +generated-y += cpucap-defs.h | generated-y += sysreg-defs.h Mark. > > diff --git a/arch/arm64/include/asm/cpucaps.h b/arch/arm64/include/asm/cpucaps.h > new file mode 100644 > index 0000000000000..7333b5bbf4488 > --- /dev/null > +++ b/arch/arm64/include/asm/cpucaps.h > @@ -0,0 +1,8 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > + > +#ifndef __ASM_CPUCAPS_H > +#define __ASM_CPUCAPS_H > + > +#include > + > +#endif /* __ASM_CPUCAPS_H */ > diff --git a/arch/arm64/tools/Makefile b/arch/arm64/tools/Makefile > index 07a93ab21a62b..fa2251d9762d9 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)/sysreg-defs.h > +kapi-hdrs-y := $(kapi)/cpucap-defs.h $(kapi)/sysreg-defs.h > > targets += $(addprefix ../../../, $(kapi-hdrs-y)) > > @@ -17,7 +17,7 @@ quiet_cmd_gen_cpucaps = GEN $@ > 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 > +$(kapi)/cpucap-defs.h: $(src)/gen-cpucaps.awk $(src)/cpucaps FORCE > $(call if_changed,gen_cpucaps) > > $(kapi)/sysreg-defs.h: $(src)/gen-sysreg.awk $(src)/sysreg FORCE > diff --git a/arch/arm64/tools/gen-cpucaps.awk b/arch/arm64/tools/gen-cpucaps.awk > index 8525980379d71..2f4f61a0af17e 100755 > --- a/arch/arm64/tools/gen-cpucaps.awk > +++ b/arch/arm64/tools/gen-cpucaps.awk > @@ -15,8 +15,8 @@ function fatal(msg) { > /^#/ { next } > > BEGIN { > - print "#ifndef __ASM_CPUCAPS_H" > - print "#define __ASM_CPUCAPS_H" > + print "#ifndef __ASM_CPUCAP_DEFS_H" > + print "#define __ASM_CPUCAP_DEFS_H" > print "" > print "/* Generated file - do not edit */" > cap_num = 0 > @@ -31,7 +31,7 @@ BEGIN { > END { > printf("#define ARM64_NCAPS\t\t\t\t\t%d\n", cap_num) > print "" > - print "#endif /* __ASM_CPUCAPS_H */" > + print "#endif /* __ASM_CPUCAP_DEFS_H */" > } > > # Any lines not handled by previous rules are unexpected > -- > 2.30.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel