xref: /linux/arch/x86/um/sys_call_table_32.c (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1b2441318SGreg Kroah-Hartman // SPDX-License-Identifier: GPL-2.0
245db1c61SH. Peter Anvin /*
345db1c61SH. Peter Anvin  * System call table for UML/i386, copied from arch/x86/kernel/syscall_*.c
445db1c61SH. Peter Anvin  * with some changes for UML.
545db1c61SH. Peter Anvin  */
645db1c61SH. Peter Anvin 
745db1c61SH. Peter Anvin #include <linux/linkage.h>
845db1c61SH. Peter Anvin #include <linux/sys.h>
945db1c61SH. Peter Anvin #include <linux/cache.h>
10034042ccSAndy Lutomirski #include <asm/syscall.h>
1145db1c61SH. Peter Anvin 
12*9142be9eSJosh Poimboeuf extern asmlinkage long sys_ni_syscall(unsigned long, unsigned long,
13*9142be9eSJosh Poimboeuf 				      unsigned long, unsigned long,
14*9142be9eSJosh Poimboeuf 				      unsigned long, unsigned long);
15*9142be9eSJosh Poimboeuf 
1645db1c61SH. Peter Anvin /*
1745db1c61SH. Peter Anvin  * Below you can see, in terms of #define's, the differences between the x86-64
1845db1c61SH. Peter Anvin  * and the UML syscall table.
1945db1c61SH. Peter Anvin  */
2045db1c61SH. Peter Anvin 
2145db1c61SH. Peter Anvin /* Not going to be implemented by UML, since we have no hardware. */
2247db9e7cSH. Peter Anvin #define sys_iopl sys_ni_syscall
2345db1c61SH. Peter Anvin #define sys_ioperm sys_ni_syscall
2445db1c61SH. Peter Anvin 
2545db1c61SH. Peter Anvin #define sys_vm86old sys_ni_syscall
2645db1c61SH. Peter Anvin #define sys_vm86 sys_ni_syscall
2745db1c61SH. Peter Anvin 
286218d0f6SMasahiro Yamada #define __SYSCALL_WITH_COMPAT(nr, native, compat)	__SYSCALL(nr, native)
29*9142be9eSJosh Poimboeuf #define __SYSCALL_NORETURN __SYSCALL
306218d0f6SMasahiro Yamada 
316218d0f6SMasahiro Yamada #define __SYSCALL(nr, sym) extern asmlinkage long sym(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long);
3245db1c61SH. Peter Anvin #include <asm/syscalls_32.h>
336218d0f6SMasahiro Yamada #undef  __SYSCALL
34*9142be9eSJosh Poimboeuf 
35d48ca5b9SBrian Gerst #define __SYSCALL(nr, sym) sym,
36b485342bSDaniel Borkmann const sys_call_ptr_t sys_call_table[] ____cacheline_aligned = {
3745db1c61SH. Peter Anvin #include <asm/syscalls_32.h>
3845db1c61SH. Peter Anvin };
3945db1c61SH. Peter Anvin 
4045db1c61SH. Peter Anvin int syscall_table_size = sizeof(sys_call_table);
41