summaryrefslogtreecommitdiff
path: root/arch/arc/kernel
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2024-04-23 16:12:55 +0200
committerArnd Bergmann <arnd@arndb.de>2024-07-10 14:23:38 +0200
commit4414ad8eb4c209aa782916016be175b61a357088 (patch)
treed0c8ac1ecdd2d3a486775c0ecd1e185237107c2d /arch/arc/kernel
parent505d66d1abfb90853e24ab6cbdf83b611473d6fc (diff)
downloadlinux-4414ad8eb4c209aa782916016be175b61a357088.tar.gz
linux-4414ad8eb4c209aa782916016be175b61a357088.tar.bz2
linux-4414ad8eb4c209aa782916016be175b61a357088.zip
arc: convert to generic syscall table
The uapi/asm/unistd_32.h and asm/syscall_table_32.h headers can now be generated from scripts/syscall.tbl, which makes this consistent with the other architectures that have their own syscall.tbl. arc has a couple of architecture specific system calls, which I add to the generic table. This for some reason includes the deprecated sys_sysfs() syscall that was presumably added by accident. The time32, renameat, stat64 and rlimit entries in the syscall_abis_32 entry are for system calls that were part of the generic ABI when arch/arc got added but are no longer enabled by default for new architectures. Both the user visible side of asm/unistd.h and the internal syscall table in the kernel should have the same effective contents after this. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arc/kernel')
-rw-r--r--arch/arc/kernel/Makefile.syscalls3
-rw-r--r--arch/arc/kernel/sys.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/arch/arc/kernel/Makefile.syscalls b/arch/arc/kernel/Makefile.syscalls
new file mode 100644
index 000000000000..391d30ab7a83
--- /dev/null
+++ b/arch/arc/kernel/Makefile.syscalls
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0
+
+syscall_abis_32 += arc time32 renameat stat64 rlimit
diff --git a/arch/arc/kernel/sys.c b/arch/arc/kernel/sys.c
index 1069446bdc58..36a2a95c083b 100644
--- a/arch/arc/kernel/sys.c
+++ b/arch/arc/kernel/sys.c
@@ -8,11 +8,12 @@
#define sys_clone sys_clone_wrapper
#define sys_clone3 sys_clone3_wrapper
+#define sys_mmap2 sys_mmap_pgoff
-#undef __SYSCALL
#define __SYSCALL(nr, call) [nr] = (call),
+#define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, native)
void *sys_call_table[NR_syscalls] = {
[0 ... NR_syscalls-1] = sys_ni_syscall,
-#include <asm/unistd.h>
+#include <asm/syscall_table_32.h>
};