Commit 4c02c7e0 authored by Charlie Jenkins's avatar Charlie Jenkins Committed by Arnaldo Carvalho de Melo
Browse files

perf tools powerpc: Use generic syscall table scripts



Use the generic scripts to generate headers from the syscall table
instead of the custom ones for powerpc.

Signed-off-by: default avatarCharlie Jenkins <charlie@rivosinc.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Guo Ren <guoren@kernel.org>
Cc: Günther Noack <gnoack@google.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Leo Yan <leo.yan@linux.dev>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mickaël Salaün <mic@digikod.net>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20250108-perf_syscalltbl-v6-14-7543b5293098@rivosinc.com
Link: https://lore.kernel.org/lkml/20250110100505.78d81450@canb.auug.org.au
[ Stephen Rothwell noticed on linux-next that the powerpc build for perf was broken and ...]
Link: https://lore.kernel.org/lkml/20250109-perf_powerpc_spu-v1-1-c097fc43737e@rivosinc.com


[ ... Charlie fixed it up and asked for it to be squashed to avoid breaking bisection. ]
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 619ffe66
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ $(call detected_var,SRCARCH)
ifneq ($(NO_SYSCALL_TABLE),1)
  NO_SYSCALL_TABLE := 1

  ifeq ($(SRCARCH),$(filter $(SRCARCH),powerpc s390))
  ifeq ($(SRCARCH),s390)
    NO_SYSCALL_TABLE := 0
  endif

@@ -49,7 +49,6 @@ endif

# Additional ARCH settings for ppc
ifeq ($(SRCARCH),powerpc)
  CFLAGS += -I$(OUTPUT)arch/powerpc/include/generated
  ifndef NO_LIBUNWIND
    LIBUNWIND_LIBS := -lunwind -lunwind-ppc64
  endif
+1 −1
Original line number Diff line number Diff line
@@ -311,7 +311,7 @@ FEATURE_TESTS := all
endif
endif
# architectures that use the generic syscall table
generic_syscall_table_archs := riscv arc csky arm sh sparc xtensa x86 alpha parisc arm64 loongarch mips
generic_syscall_table_archs := riscv arc csky arm sh sparc xtensa x86 alpha parisc arm64 loongarch mips powerpc
ifneq ($(filter $(SRCARCH), $(generic_syscall_table_archs)),)
include $(srctree)/tools/perf/scripts/Makefile.syscalls
endif
+0 −25
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
HAVE_KVM_STAT_SUPPORT := 1
PERF_HAVE_JITDUMP := 1

#
# Syscall table generation for perf
#

out    := $(OUTPUT)arch/powerpc/include/generated/asm
header32 := $(out)/syscalls_32.c
header64 := $(out)/syscalls_64.c
sysprf := $(srctree)/tools/perf/arch/powerpc/entry/syscalls
sysdef := $(sysprf)/syscall.tbl
systbl := $(sysprf)/mksyscalltbl

# Create output directory if not already present
$(shell [ -d '$(out)' ] || mkdir -p '$(out)')

$(header64): $(sysdef) $(systbl)
	$(Q)$(SHELL) '$(systbl)' '64' $(sysdef) > $@

$(header32): $(sysdef) $(systbl)
	$(Q)$(SHELL) '$(systbl)' '32' $(sysdef) > $@

clean::
	$(call QUIET_CLEAN, powerpc) $(RM) $(header32) $(header64)

archheaders: $(header32) $(header64)
+3 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
syscall-y += syscalls_32.h
syscall-y += syscalls_64.h
+6 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0

syscall_abis_32 += nospu
syscall_abis_64 += nospu

syscalltbl = $(srctree)/tools/perf/arch/powerpc/entry/syscalls/syscall.tbl
Loading