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.

nios2: 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.

nios2 has one extra system call that gets added to scripts/syscall.tbl.

The time32, stat64, and rlimit entries in the syscall_abis_32
line are for system calls that were part of the generic ABI when
arch/nios2 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>

+26 -17
+2
arch/nios2/include/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 + syscall-y += syscall_table_32.h 3 + 2 4 generic-y += cmpxchg.h 3 5 generic-y += extable.h 4 6 generic-y += kvm_para.h
+12
arch/nios2/include/asm/unistd.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 + #ifndef __ASM_UNISTD_H 3 + #define __ASM_UNISTD_H 4 + 5 + #include <uapi/asm/unistd.h> 6 + 7 + #define __ARCH_WANT_STAT64 8 + #define __ARCH_WANT_SET_GET_RLIMIT 9 + 10 + #define __ARCH_BROKEN_SYS_CLONE3 11 + 12 + #endif
+2
arch/nios2/include/uapi/asm/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 + syscall-y += unistd_32.h 3 + 2 4 generic-y += ucontext.h
+1 -15
arch/nios2/include/uapi/asm/unistd.h
··· 16 16 * 17 17 */ 18 18 19 - #define sys_mmap2 sys_mmap_pgoff 20 - 21 - #define __ARCH_WANT_RENAMEAT 22 - #define __ARCH_WANT_STAT64 23 - #define __ARCH_WANT_SET_GET_RLIMIT 24 - #define __ARCH_WANT_TIME32_SYSCALLS 25 - 26 - #define __ARCH_BROKEN_SYS_CLONE3 27 - 28 - /* Use the standard ABI for syscalls */ 29 - #include <asm-generic/unistd.h> 30 - 31 - /* Additional Nios II specific syscalls. */ 32 - #define __NR_cacheflush (__NR_arch_specific_syscall) 33 - __SYSCALL(__NR_cacheflush, sys_cacheflush) 19 + #include <asm/unistd_32.h>
+3
arch/nios2/kernel/Makefile.syscalls
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + 3 + syscall_abis_32 += nios2 time32 stat64 renameat rlimit
+4 -2
arch/nios2/kernel/syscall_table.c
··· 9 9 10 10 #include <asm/syscalls.h> 11 11 12 - #undef __SYSCALL 13 12 #define __SYSCALL(nr, call) [nr] = (call), 13 + #define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, native) 14 + 15 + #define sys_mmap2 sys_mmap_pgoff 14 16 15 17 void *sys_call_table[__NR_syscalls] = { 16 18 [0 ... __NR_syscalls-1] = sys_ni_syscall, 17 - #include <asm/unistd.h> 19 + #include <asm/syscall_table_32.h> 18 20 };
+2
scripts/syscall.tbl
··· 297 297 244 csky set_thread_area sys_set_thread_area 298 298 245 csky cacheflush sys_cacheflush 299 299 300 + 244 nios2 cacheflush sys_cacheflush 301 + 300 302 260 time32 wait4 sys_wait4 compat_sys_wait4 301 303 260 64 wait4 sys_wait4 302 304 261 common prlimit64 sys_prlimit64