[PATCH v2 03/16] perf tools: csky: Support generic syscall headers
Charlie Jenkins
charlie at rivosinc.com
Fri Dec 13 00:32:53 UTC 2024
csky uses the generic syscall table, use that in perf instead of
requiring libaudit.
Signed-off-by: Charlie Jenkins <charlie at rivosinc.com>
---
tools/perf/Makefile.config | 2 +-
tools/perf/Makefile.perf | 2 +-
tools/perf/arch/csky/entry/syscalls/Kbuild | 2 ++
tools/perf/arch/csky/entry/syscalls/Makefile.syscalls | 3 +++
tools/perf/arch/csky/include/syscall_table.h | 2 ++
5 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 3959a9c9972999f6d1bb85e8c1d7dc5dce92fd09..6fcaa051a47621b818b4c9d967eeed050056e400 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -36,7 +36,7 @@ ifneq ($(NO_SYSCALL_TABLE),1)
endif
# architectures that use the generic syscall table scripts
- ifeq ($(SRCARCH),$(filter $(SRCARCH),riscv arc))
+ ifeq ($(SRCARCH),$(filter $(SRCARCH),riscv arc csky))
NO_SYSCALL_TABLE := 0
CFLAGS += -DGENERIC_SYSCALL_TABLE
CFLAGS += -I$(OUTPUT)/tools/perf/arch/$(SRCARCH)/include/generated
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 3b463b42b0e3982e74056e672b2ee6adad5a3f0e..407f589046e032c4103c3b6b82c9d044560c5bac 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -311,7 +311,7 @@ FEATURE_TESTS := all
endif
endif
# architectures that use the generic syscall table
-ifeq ($(SRCARCH),$(filter $(SRCARCH),riscv arc))
+ifeq ($(SRCARCH),$(filter $(SRCARCH),riscv arc csky))
include $(srctree)/tools/perf/scripts/Makefile.syscalls
endif
include Makefile.config
diff --git a/tools/perf/arch/csky/entry/syscalls/Kbuild b/tools/perf/arch/csky/entry/syscalls/Kbuild
new file mode 100644
index 0000000000000000000000000000000000000000..11707c481a24ecf4e220e51eb1aca890fe929a13
--- /dev/null
+++ b/tools/perf/arch/csky/entry/syscalls/Kbuild
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
+syscall-y += syscalls_32.h
diff --git a/tools/perf/arch/csky/entry/syscalls/Makefile.syscalls b/tools/perf/arch/csky/entry/syscalls/Makefile.syscalls
new file mode 100644
index 0000000000000000000000000000000000000000..ea2dd10d0571df464574a9c0232ada0ac1f79a3f
--- /dev/null
+++ b/tools/perf/arch/csky/entry/syscalls/Makefile.syscalls
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0
+
+syscall_abis_32 += csky time32 stat64 rlimit
diff --git a/tools/perf/arch/csky/include/syscall_table.h b/tools/perf/arch/csky/include/syscall_table.h
new file mode 100644
index 0000000000000000000000000000000000000000..4c942821662d95216765b176a84d5fc7974e1064
--- /dev/null
+++ b/tools/perf/arch/csky/include/syscall_table.h
@@ -0,0 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm/syscalls_32.h>
--
2.34.1
More information about the Linux-security-module-archive
mailing list