1 /* System call table for UML/x86-64, copied from arch/x86_64/kernel/syscall.c
2 * with some changes for UML. */
4 #include <linux/linkage.h>
6 #include <linux/cache.h>
7 #include <kern_constants.h>
11 /* Below you can see, in terms of #define's, the differences between the x86-64
12 * and the UML syscall table. */
14 /* Not going to be implemented by UML, since we have no hardware. */
15 #define stub_iopl sys_ni_syscall
16 #define sys_ioperm sys_ni_syscall
18 /* The UML TLS problem. Note that x86_64 does not implement this, so the below
19 * is needed only for the ia32 compatibility. */
20 /*#define sys_set_thread_area sys_ni_syscall
21 #define sys_get_thread_area sys_ni_syscall*/
23 /* On UML we call it this way ("old" means it's not mmap2) */
24 #define sys_mmap old_mmap
25 /* On x86-64 sys_uname is actually sys_newuname plus a compatibility trick.
26 * See arch/x86_64/kernel/sys_x86_64.c */
27 #define sys_uname sys_uname64
29 #define stub_clone sys_clone
30 #define stub_fork sys_fork
31 #define stub_vfork sys_vfork
32 #define stub_execve sys_execve
33 #define stub_rt_sigsuspend sys_rt_sigsuspend
34 #define stub_sigaltstack sys_sigaltstack
35 #define stub_rt_sigreturn sys_rt_sigreturn
37 #define __SYSCALL(nr, sym) extern asmlinkage void sym(void) ;
38 #undef _ASM_X86_64_UNISTD_H_
39 #include <asm-x86/unistd_64.h>
42 #define __SYSCALL(nr, sym) [ nr ] = sym,
43 #undef _ASM_X86_64_UNISTD_H_
45 typedef void (*sys_call_ptr_t)(void);
47 extern void sys_ni_syscall(void);
49 sys_call_ptr_t sys_call_table[UM_NR_syscall_max+1] __cacheline_aligned = {
50 /* Smells like a like a compiler bug -- it doesn't work when the & below is removed. */
51 [0 ... UM_NR_syscall_max] = &sys_ni_syscall,
52 #include <asm-x86/unistd_64.h>