Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

loongarch: convert to generic syscall table

The uapi/asm/unistd_64.h and asm/syscall_table_64.h headers can now be
generated from scripts/syscall.tbl, which makes this consistent with
the other architectures that have their own syscall.tbl.

Unlike the other architectures using the asm-generic header, loongarch
uses none of the deprecated system calls at the moment.

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>

+12 -3
+1
arch/loongarch/include/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 + syscall-y += syscall_table_64.h 2 3 generated-y += orc_hash.h 3 4 4 5 generic-y += mcs_spinlock.h
+2
arch/loongarch/include/asm/unistd.h
··· 8 8 9 9 #include <uapi/asm/unistd.h> 10 10 11 + #define __ARCH_WANT_SYS_CLONE 12 + 11 13 #define NR_syscalls (__NR_syscalls)
+2
arch/loongarch/include/uapi/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 + syscall-y += unistd_64.h 3 + 2 4 generic-y += kvm_para.h
+1 -2
arch/loongarch/include/uapi/asm/unistd.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - #define __ARCH_WANT_SYS_CLONE 3 2 4 - #include <asm-generic/unistd.h> 3 + #include <asm/unistd_64.h>
+4
arch/loongarch/kernel/Makefile.syscalls
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + 3 + # No special ABIs on loongarch so far 4 + syscall_abis_64 +=
+2 -1
arch/loongarch/kernel/syscall.c
··· 20 20 21 21 #undef __SYSCALL 22 22 #define __SYSCALL(nr, call) [nr] = (call), 23 + #define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, native) 23 24 24 25 SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len, unsigned long, 25 26 prot, unsigned long, flags, unsigned long, fd, unsigned long, offset) ··· 33 32 34 33 void *sys_call_table[__NR_syscalls] = { 35 34 [0 ... __NR_syscalls - 1] = sys_ni_syscall, 36 - #include <asm/unistd.h> 35 + #include <asm/syscall_table_64.h> 37 36 }; 38 37 39 38 typedef long (*sys_call_fn)(unsigned long, unsigned long,