Commit | Line | Data |
---|---|---|
303395ac PA |
1 | #ifndef _ASM_X86_UNISTD_H |
2 | #define _ASM_X86_UNISTD_H 1 | |
3 | ||
6cbb369f PA |
4 | /* x32 syscall flag bit */ |
5 | #define __X32_SYSCALL_BIT 0x40000000 | |
6 | ||
96a388de | 7 | #ifdef __KERNEL__ |
fca460f9 PA |
8 | |
9 | # ifdef CONFIG_X86_X32_ABI | |
10 | # define __SYSCALL_MASK (~(__X32_SYSCALL_BIT)) | |
11 | # else | |
12 | # define __SYSCALL_MASK (~0) | |
13 | # endif | |
14 | ||
b11caa7c | 15 | # ifdef CONFIG_X86_32 |
303395ac PA |
16 | |
17 | # include <asm/unistd_32.h> | |
303395ac | 18 | # define __ARCH_WANT_STAT64 |
4f2f81a5 | 19 | # define __ARCH_WANT_SYS_IPC |
303395ac PA |
20 | # define __ARCH_WANT_SYS_OLD_MMAP |
21 | # define __ARCH_WANT_SYS_OLD_SELECT | |
22 | ||
b11caa7c | 23 | # else |
303395ac PA |
24 | |
25 | # include <asm/unistd_64.h> | |
ea499fec | 26 | # include <asm/unistd_64_x32.h> |
303395ac PA |
27 | # define __ARCH_WANT_COMPAT_SYS_TIME |
28 | ||
b11caa7c | 29 | # endif |
303395ac PA |
30 | |
31 | # define __ARCH_WANT_OLD_READDIR | |
32 | # define __ARCH_WANT_OLD_STAT | |
33 | # define __ARCH_WANT_SYS_ALARM | |
34 | # define __ARCH_WANT_SYS_FADVISE64 | |
35 | # define __ARCH_WANT_SYS_GETHOSTNAME | |
36 | # define __ARCH_WANT_SYS_GETPGRP | |
37 | # define __ARCH_WANT_SYS_LLSEEK | |
38 | # define __ARCH_WANT_SYS_NICE | |
39 | # define __ARCH_WANT_SYS_OLDUMOUNT | |
40 | # define __ARCH_WANT_SYS_OLD_GETRLIMIT | |
41 | # define __ARCH_WANT_SYS_OLD_UNAME | |
42 | # define __ARCH_WANT_SYS_PAUSE | |
43 | # define __ARCH_WANT_SYS_RT_SIGACTION | |
44 | # define __ARCH_WANT_SYS_RT_SIGSUSPEND | |
45 | # define __ARCH_WANT_SYS_SGETMASK | |
46 | # define __ARCH_WANT_SYS_SIGNAL | |
47 | # define __ARCH_WANT_SYS_SIGPENDING | |
48 | # define __ARCH_WANT_SYS_SIGPROCMASK | |
49 | # define __ARCH_WANT_SYS_SOCKETCALL | |
50 | # define __ARCH_WANT_SYS_TIME | |
51 | # define __ARCH_WANT_SYS_UTIME | |
52 | # define __ARCH_WANT_SYS_WAITPID | |
1d4b4b29 AV |
53 | # define __ARCH_WANT_SYS_FORK |
54 | # define __ARCH_WANT_SYS_VFORK | |
55 | # define __ARCH_WANT_SYS_CLONE | |
303395ac PA |
56 | |
57 | /* | |
58 | * "Conditional" syscalls | |
59 | * | |
60 | * What we want is __attribute__((weak,alias("sys_ni_syscall"))), | |
61 | * but it doesn't work on all toolchains, so we just do it by hand | |
62 | */ | |
63 | # define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | |
64 | ||
b11caa7c AB |
65 | #else |
66 | # ifdef __i386__ | |
303395ac | 67 | # include <asm/unistd_32.h> |
98e5272f | 68 | # elif defined(__ILP32__) |
6cbb369f | 69 | # include <asm/unistd_x32.h> |
98e5272f L |
70 | # else |
71 | # include <asm/unistd_64.h> | |
96a388de TG |
72 | # endif |
73 | #endif | |
303395ac PA |
74 | |
75 | #endif /* _ASM_X86_UNISTD_H */ |