]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: Factor out cpucap definitions
authorMark Rutland <mark.rutland@arm.com>
Mon, 16 Oct 2023 10:24:26 +0000 (11:24 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Mon, 16 Oct 2023 11:57:45 +0000 (12:57 +0100)
For clarity it would be nice to factor cpucap manipulation out of
<asm/cpufeature.h>, and the obvious place would be <asm/cpucap.h>, but
this will clash somewhat with <generated/asm/cpucaps.h>.

Rename <generated/asm/cpucaps.h> to <generated/asm/cpucap-defs.h>,
matching what we do for <generated/asm/sysreg-defs.h>, and introduce a
new <asm/cpucaps.h> which includes the generated header.

Subsequent patches will fill out <asm/cpucaps.h>.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/Kbuild
arch/arm64/include/asm/cpucaps.h [new file with mode: 0644]
arch/arm64/tools/Makefile
arch/arm64/tools/gen-cpucaps.awk

index 5c8ee5a541d2047c10c8440e3691d6b1b9f97c25..4b6d2d52053e42e76dc6bc0f984b28095a33e126 100644 (file)
@@ -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
diff --git a/arch/arm64/include/asm/cpucaps.h b/arch/arm64/include/asm/cpucaps.h
new file mode 100644 (file)
index 0000000..7333b5b
--- /dev/null
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef __ASM_CPUCAPS_H
+#define __ASM_CPUCAPS_H
+
+#include <asm/cpucap-defs.h>
+
+#endif /* __ASM_CPUCAPS_H */
index 07a93ab21a62b2fdcf56eb50f587ea3201028d33..fa2251d9762d9ada612272a2bea8ab45efe69607 100644 (file)
@@ -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
index 8525980379d715bc2bc37b574c385aa8049adce4..2f4f61a0af17e7d8bbeada8e36192dfb1d83176e 100755 (executable)
@@ -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