Skip to content

Commit 00d1bfa

Browse files
charlie-rivosacmel
authored andcommitted
perf tools s390: Use generic syscall table scripts
Use the generic scripts to generate headers from the syscall table instead of the custom ones for s390. 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: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 4c02c7e commit 00d1bfa

File tree

8 files changed

+12
-64
lines changed

8 files changed

+12
-64
lines changed

tools/perf/Makefile.config

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

34-
ifeq ($(SRCARCH),s390)
35-
NO_SYSCALL_TABLE := 0
36-
endif
37-
3834
# architectures that use the generic syscall table scripts
3935
ifneq ($(filter $(SRCARCH), $(generic_syscall_table_archs)),)
4036
NO_SYSCALL_TABLE := 0
@@ -90,7 +86,7 @@ ifeq ($(SRCARCH),loongarch)
9086
endif
9187

9288
ifeq ($(ARCH),s390)
93-
CFLAGS += -fPIC -I$(OUTPUT)arch/s390/include/generated
89+
CFLAGS += -fPIC
9490
endif
9591

9692
ifeq ($(ARCH),mips)

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 powerpc
314+
generic_syscall_table_archs := riscv arc csky arm sh sparc xtensa x86 alpha parisc arm64 loongarch mips powerpc s390
315315
ifneq ($(filter $(SRCARCH), $(generic_syscall_table_archs)),)
316316
include $(srctree)/tools/perf/scripts/Makefile.syscalls
317317
endif

tools/perf/arch/s390/Makefile

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,3 @@
11
# SPDX-License-Identifier: GPL-2.0-only
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/s390/include/generated/asm
10-
header := $(out)/syscalls_64.c
11-
sysprf := $(srctree)/tools/perf/arch/s390/entry/syscalls
12-
sysdef := $(sysprf)/syscall.tbl
13-
systbl := $(sysprf)/mksyscalltbl
14-
15-
# Create output directory if not already present
16-
$(shell [ -d '$(out)' ] || mkdir -p '$(out)')
17-
18-
$(header): $(sysdef) $(systbl)
19-
$(Q)$(SHELL) '$(systbl)' $(sysdef) > $@
20-
21-
clean::
22-
$(call QUIET_CLEAN, s390) $(RM) $(header)
23-
24-
archheaders: $(header)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
syscall-y += syscalls_64.h
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
syscall_abis_64 += renameat rlimit memfd_secret
4+
5+
syscalltbl = $(srctree)/tools/perf/arch/s390/entry/syscalls/syscall.tbl

tools/perf/arch/s390/entry/syscalls/mksyscalltbl

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#include <asm/syscalls_64.h>

tools/perf/util/syscalltbl.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@
1414
#include <string.h>
1515
#include "string2.h"
1616

17-
#if defined(__s390x__)
18-
#include <asm/syscalls_64.c>
19-
const int syscalltbl_native_max_id = SYSCALLTBL_S390_64_MAX_ID;
20-
static const char *const *syscalltbl_native = syscalltbl_s390_64;
21-
#elif defined(GENERIC_SYSCALL_TABLE)
17+
#if defined(GENERIC_SYSCALL_TABLE)
2218
#include <syscall_table.h>
2319
const int syscalltbl_native_max_id = SYSCALLTBL_MAX_ID;
2420
static const char *const *syscalltbl_native = syscalltbl;

0 commit comments

Comments
 (0)