summaryrefslogtreecommitdiff
path: root/arch/hexagon/kernel
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2024-06-20 15:36:30 +0200
committerArnd Bergmann <arnd@arndb.de>2024-07-10 14:23:38 +0200
commit36d69c29759ec2299c1537e292a466eab3824087 (patch)
tree32cd214e245648001dd70cb495985d9c073e3bf5 /arch/hexagon/kernel
parentf840cab63efe802638bf536221deecfbf3f569ed (diff)
hexagon: use new system call 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. The time32, stat64, rlimit and renameat entries in the syscall_abis_32 line are for system calls that were part of the generic ABI when arch/hexagon got added but are no longer enabled by default for new architectures. As a side-effect, calling an unimplemented syscall now return -ENOSYS rather than branching into a NULL pointer. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/hexagon/kernel')
-rw-r--r--arch/hexagon/kernel/Makefile.syscalls3
-rw-r--r--arch/hexagon/kernel/syscalltab.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/arch/hexagon/kernel/Makefile.syscalls b/arch/hexagon/kernel/Makefile.syscalls
new file mode 100644
index 000000000000..d2b7c5d44d95
--- /dev/null
+++ b/arch/hexagon/kernel/Makefile.syscalls
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0
+
+syscall_abis_32 += hexagon time32 stat64 rlimit renameat
diff --git a/arch/hexagon/kernel/syscalltab.c b/arch/hexagon/kernel/syscalltab.c
index 5d98bdc494ec..b53e2eead4ac 100644
--- a/arch/hexagon/kernel/syscalltab.c
+++ b/arch/hexagon/kernel/syscalltab.c
@@ -11,8 +11,10 @@
#include <asm/syscall.h>
-#undef __SYSCALL
#define __SYSCALL(nr, call) [nr] = (call),
+#define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, native)
+
+#define sys_mmap2 sys_mmap_pgoff
SYSCALL_DEFINE6(hexagon_fadvise64_64, int, fd, int, advice,
SC_ARG64(offset), SC_ARG64(len))
@@ -21,6 +23,8 @@ SYSCALL_DEFINE6(hexagon_fadvise64_64, int, fd, int, advice,
}
#define sys_fadvise64_64 sys_hexagon_fadvise64_64
+#define sys_sync_file_range sys_sync_file_range2
+
void *sys_call_table[__NR_syscalls] = {
-#include <asm/unistd.h>
+#include <asm/syscall_table_32.h>
};