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 <linux/config.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 /* For __NR_time. The x86-64 name hopefully will change from sys_time64 to
24 * sys_time (since the current situation is bogus). I've sent a patch to cleanup
25 * this. Remove below the obsoleted line. */
26 #define sys_time64 um_time
27 #define sys_time um_time
29 /* On UML we call it this way ("old" means it's not mmap2) */
30 #define sys_mmap old_mmap
31 /* On x86-64 sys_uname is actually sys_newuname plus a compatibility trick.
32 * See arch/x86_64/kernel/sys_x86_64.c */
33 #define sys_uname sys_uname64
35 #define stub_clone sys_clone
36 #define stub_fork sys_fork
37 #define stub_vfork sys_vfork
38 #define stub_execve sys_execve
39 #define stub_rt_sigsuspend sys_rt_sigsuspend
40 #define stub_sigaltstack sys_sigaltstack
41 #define stub_rt_sigreturn sys_rt_sigreturn
43 #define __SYSCALL(nr, sym) extern asmlinkage void sym(void) ;
44 #undef _ASM_X86_64_UNISTD_H_
45 #include <asm-x86_64/unistd.h>
48 #define __SYSCALL(nr, sym) [ nr ] = sym,
49 #undef _ASM_X86_64_UNISTD_H_
51 typedef void (*sys_call_ptr_t)(void);
53 extern void sys_ni_syscall(void);
55 sys_call_ptr_t sys_call_table[__NR_syscall_max+1] __cacheline_aligned = {
56 /* Smells like a like a compiler bug -- it doesn't work when the & below is removed. */
57 [0 ... __NR_syscall_max] = &sys_ni_syscall,
58 #include <asm-x86_64/unistd.h>