Skip to content

Commit e2bdd17

Browse files
committed
perf build: Generate arm64's sysreg-defs.h and add to include path
Start generating sysreg-defs.h in anticipation of updating sysreg.h to a version that needs the generated output. Acked-by: Arnaldo Carvalho de Melo <[email protected]> Acked-by: Namhyung Kim <[email protected]> Acked-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent 02e85f7 commit e2bdd17

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

tools/perf/Makefile.perf

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,15 @@ drm_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/drm_ioctl.sh
443443
# Create output directory if not already present
444444
_dummy := $(shell [ -d '$(beauty_ioctl_outdir)' ] || mkdir -p '$(beauty_ioctl_outdir)')
445445

446+
arm64_gen_sysreg_dir := $(srctree)/tools/arch/arm64/tools
447+
448+
arm64-sysreg-defs: FORCE
449+
$(Q)$(MAKE) -C $(arm64_gen_sysreg_dir)
450+
451+
arm64-sysreg-defs-clean:
452+
$(call QUIET_CLEAN,arm64-sysreg-defs)
453+
$(Q)$(MAKE) -C $(arm64_gen_sysreg_dir) clean > /dev/null
454+
446455
$(drm_ioctl_array): $(drm_hdr_dir)/drm.h $(drm_hdr_dir)/i915_drm.h $(drm_ioctl_tbl)
447456
$(Q)$(SHELL) '$(drm_ioctl_tbl)' $(drm_hdr_dir) > $@
448457

@@ -716,7 +725,9 @@ endif
716725
__build-dir = $(subst $(OUTPUT),,$(dir $@))
717726
build-dir = $(or $(__build-dir),.)
718727

719-
prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h archheaders $(drm_ioctl_array) \
728+
prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h archheaders \
729+
arm64-sysreg-defs \
730+
$(drm_ioctl_array) \
720731
$(fadvise_advice_array) \
721732
$(fsconfig_arrays) \
722733
$(fsmount_arrays) \
@@ -1125,7 +1136,7 @@ endif # BUILD_BPF_SKEL
11251136
bpf-skel-clean:
11261137
$(call QUIET_CLEAN, bpf-skel) $(RM) -r $(SKEL_TMP_OUT) $(SKELETONS)
11271138

1128-
clean:: $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clean $(LIBSYMBOL)-clean $(LIBPERF)-clean fixdep-clean python-clean bpf-skel-clean tests-coresight-targets-clean
1139+
clean:: $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clean $(LIBSYMBOL)-clean $(LIBPERF)-clean arm64-sysreg-defs-clean fixdep-clean python-clean bpf-skel-clean tests-coresight-targets-clean
11291140
$(call QUIET_CLEAN, core-objs) $(RM) $(LIBPERF_A) $(OUTPUT)perf-archive $(OUTPUT)perf-iostat $(LANG_BINDINGS)
11301141
$(Q)find $(or $(OUTPUT),.) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
11311142
$(Q)$(RM) $(OUTPUT).config-detected

tools/perf/util/Build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ CFLAGS_rbtree.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ET
345345
CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
346346
CFLAGS_hweight.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PERFCONFIG_SQ))"
347347
CFLAGS_header.o += -include $(OUTPUT)PERF-VERSION-FILE
348-
CFLAGS_arm-spe.o += -I$(srctree)/tools/arch/arm64/include/
348+
CFLAGS_arm-spe.o += -I$(srctree)/tools/arch/arm64/include/ -I$(srctree)/tools/arch/arm64/include/generated/
349349

350350
$(OUTPUT)util/argv_split.o: ../lib/argv_split.c FORCE
351351
$(call rule_mkdir)

0 commit comments

Comments
 (0)