Skip to content

Commit 4c02c7e

Browse files
charlie-rivosacmel
authored andcommitted
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: Charlie Jenkins <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Christian Brauner <[email protected]> Cc: Guo Ren <[email protected]> Cc: Günther Noack <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: James Clark <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: John Garry <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Leo Yan <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Mickaël Salaün <[email protected]> Cc: Mike Leach <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Palmer Dabbelt <[email protected]> Cc: Paul Walmsley <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephen Rothwell <[email protected]> Cc: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/lkml/[email protected] [ Stephen Rothwell noticed on linux-next that the powerpc build for perf was broken and ...] Link: https://lore.kernel.org/lkml/[email protected] [ ... Charlie fixed it up and asked for it to be squashed to avoid breaking bisection. ] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 619ffe6 commit 4c02c7e

File tree

8 files changed

+19
-75
lines changed

8 files changed

+19
-75
lines changed

tools/perf/Makefile.config

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ $(call detected_var,SRCARCH)
3131
ifneq ($(NO_SYSCALL_TABLE),1)
3232
NO_SYSCALL_TABLE := 1
3333

34-
ifeq ($(SRCARCH),$(filter $(SRCARCH),powerpc s390))
34+
ifeq ($(SRCARCH),s390)
3535
NO_SYSCALL_TABLE := 0
3636
endif
3737

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

5050
# Additional ARCH settings for ppc
5151
ifeq ($(SRCARCH),powerpc)
52-
CFLAGS += -I$(OUTPUT)arch/powerpc/include/generated
5352
ifndef NO_LIBUNWIND
5453
LIBUNWIND_LIBS := -lunwind -lunwind-ppc64
5554
endif

tools/perf/Makefile.perf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ FEATURE_TESTS := all
311311
endif
312312
endif
313313
# architectures that use the generic syscall table
314-
generic_syscall_table_archs := riscv arc csky arm sh sparc xtensa x86 alpha parisc arm64 loongarch mips
314+
generic_syscall_table_archs := riscv arc csky arm sh sparc xtensa x86 alpha parisc arm64 loongarch mips powerpc
315315
ifneq ($(filter $(SRCARCH), $(generic_syscall_table_archs)),)
316316
include $(srctree)/tools/perf/scripts/Makefile.syscalls
317317
endif

tools/perf/arch/powerpc/Makefile

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,3 @@
11
# SPDX-License-Identifier: GPL-2.0
22
HAVE_KVM_STAT_SUPPORT := 1
33
PERF_HAVE_JITDUMP := 1
4-
5-
#
6-
# Syscall table generation for perf
7-
#
8-
9-
out := $(OUTPUT)arch/powerpc/include/generated/asm
10-
header32 := $(out)/syscalls_32.c
11-
header64 := $(out)/syscalls_64.c
12-
sysprf := $(srctree)/tools/perf/arch/powerpc/entry/syscalls
13-
sysdef := $(sysprf)/syscall.tbl
14-
systbl := $(sysprf)/mksyscalltbl
15-
16-
# Create output directory if not already present
17-
$(shell [ -d '$(out)' ] || mkdir -p '$(out)')
18-
19-
$(header64): $(sysdef) $(systbl)
20-
$(Q)$(SHELL) '$(systbl)' '64' $(sysdef) > $@
21-
22-
$(header32): $(sysdef) $(systbl)
23-
$(Q)$(SHELL) '$(systbl)' '32' $(sysdef) > $@
24-
25-
clean::
26-
$(call QUIET_CLEAN, powerpc) $(RM) $(header32) $(header64)
27-
28-
archheaders: $(header32) $(header64)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
syscall-y += syscalls_32.h
3+
syscall-y += syscalls_64.h
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
syscall_abis_32 += nospu
4+
syscall_abis_64 += nospu
5+
6+
syscalltbl = $(srctree)/tools/perf/arch/powerpc/entry/syscalls/syscall.tbl

tools/perf/arch/powerpc/entry/syscalls/mksyscalltbl

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#include <asm/bitsperlong.h>
3+
4+
#if __BITS_PER_LONG == 64
5+
#include <asm/syscalls_64.h>
6+
#else
7+
#include <asm/syscalls_32.h>
8+
#endif

tools/perf/util/syscalltbl.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@
1818
#include <asm/syscalls_64.c>
1919
const int syscalltbl_native_max_id = SYSCALLTBL_S390_64_MAX_ID;
2020
static const char *const *syscalltbl_native = syscalltbl_s390_64;
21-
#elif defined(__powerpc64__)
22-
#include <asm/syscalls_64.c>
23-
const int syscalltbl_native_max_id = SYSCALLTBL_POWERPC_64_MAX_ID;
24-
static const char *const *syscalltbl_native = syscalltbl_powerpc_64;
25-
#elif defined(__powerpc__)
26-
#include <asm/syscalls_32.c>
27-
const int syscalltbl_native_max_id = SYSCALLTBL_POWERPC_32_MAX_ID;
28-
static const char *const *syscalltbl_native = syscalltbl_powerpc_32;
2921
#elif defined(GENERIC_SYSCALL_TABLE)
3022
#include <syscall_table.h>
3123
const int syscalltbl_native_max_id = SYSCALLTBL_MAX_ID;

0 commit comments

Comments
 (0)