diff options
Diffstat (limited to 'arch/um/sys-x86_64/syscall_table.c')
-rw-r--r-- | arch/um/sys-x86_64/syscall_table.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/arch/um/sys-x86_64/syscall_table.c b/arch/um/sys-x86_64/syscall_table.c index 71b2ae4ad5de..555faee0d81f 100644 --- a/arch/um/sys-x86_64/syscall_table.c +++ b/arch/um/sys-x86_64/syscall_table.c | |||
@@ -1,5 +1,7 @@ | |||
1 | /* System call table for UML/x86-64, copied from arch/x86_64/kernel/syscall.c | 1 | /* |
2 | * with some changes for UML. */ | 2 | * System call table for UML/x86-64, copied from arch/x86_64/kernel/syscall.c |
3 | * with some changes for UML. | ||
4 | */ | ||
3 | 5 | ||
4 | #include <linux/linkage.h> | 6 | #include <linux/linkage.h> |
5 | #include <linux/sys.h> | 7 | #include <linux/sys.h> |
@@ -8,22 +10,26 @@ | |||
8 | 10 | ||
9 | #define __NO_STUBS | 11 | #define __NO_STUBS |
10 | 12 | ||
11 | /* Below you can see, in terms of #define's, the differences between the x86-64 | 13 | /* |
12 | * and the UML syscall table. */ | 14 | * Below you can see, in terms of #define's, the differences between the x86-64 |
15 | * and the UML syscall table. | ||
16 | */ | ||
13 | 17 | ||
14 | /* Not going to be implemented by UML, since we have no hardware. */ | 18 | /* Not going to be implemented by UML, since we have no hardware. */ |
15 | #define stub_iopl sys_ni_syscall | 19 | #define stub_iopl sys_ni_syscall |
16 | #define sys_ioperm sys_ni_syscall | 20 | #define sys_ioperm sys_ni_syscall |
17 | 21 | ||
18 | /* The UML TLS problem. Note that x86_64 does not implement this, so the below | 22 | /* |
19 | * is needed only for the ia32 compatibility. */ | 23 | * The UML TLS problem. Note that x86_64 does not implement this, so the below |
20 | /*#define sys_set_thread_area sys_ni_syscall | 24 | * is needed only for the ia32 compatibility. |
21 | #define sys_get_thread_area sys_ni_syscall*/ | 25 | */ |
22 | 26 | ||
23 | /* On UML we call it this way ("old" means it's not mmap2) */ | 27 | /* On UML we call it this way ("old" means it's not mmap2) */ |
24 | #define sys_mmap old_mmap | 28 | #define sys_mmap old_mmap |
25 | /* On x86-64 sys_uname is actually sys_newuname plus a compatibility trick. | 29 | /* |
26 | * See arch/x86_64/kernel/sys_x86_64.c */ | 30 | * On x86-64 sys_uname is actually sys_newuname plus a compatibility trick. |
31 | * See arch/x86_64/kernel/sys_x86_64.c | ||
32 | */ | ||
27 | #define sys_uname sys_uname64 | 33 | #define sys_uname sys_uname64 |
28 | 34 | ||
29 | #define stub_clone sys_clone | 35 | #define stub_clone sys_clone |
@@ -47,7 +53,10 @@ typedef void (*sys_call_ptr_t)(void); | |||
47 | extern void sys_ni_syscall(void); | 53 | extern void sys_ni_syscall(void); |
48 | 54 | ||
49 | sys_call_ptr_t sys_call_table[UM_NR_syscall_max+1] __cacheline_aligned = { | 55 | 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. */ | 56 | /* |
57 | * Smells like a like a compiler bug -- it doesn't work when the & | ||
58 | * below is removed. | ||
59 | */ | ||
51 | [0 ... UM_NR_syscall_max] = &sys_ni_syscall, | 60 | [0 ... UM_NR_syscall_max] = &sys_ni_syscall, |
52 | #include <asm-x86/unistd_64.h> | 61 | #include <asm-x86/unistd_64.h> |
53 | }; | 62 | }; |