x32: Generate <asm/unistd_64_x32.h>
[linux-2.6-block.git] / arch / x86 / include / asm / unistd.h
1 #ifndef _ASM_X86_UNISTD_H
2 #define _ASM_X86_UNISTD_H 1
3
4 /* x32 syscall flag bit */
5 #define __X32_SYSCALL_BIT       0x40000000
6
7 #ifdef __KERNEL__
8 # ifdef CONFIG_X86_32
9
10 #  include <asm/unistd_32.h>
11 #  define __ARCH_WANT_IPC_PARSE_VERSION
12 #  define __ARCH_WANT_STAT64
13 #  define __ARCH_WANT_SYS_IPC
14 #  define __ARCH_WANT_SYS_OLD_MMAP
15 #  define __ARCH_WANT_SYS_OLD_SELECT
16
17 # else
18
19 #  include <asm/unistd_64.h>
20 #  include <asm/unistd_64_x32.h>
21 #  define __ARCH_WANT_COMPAT_SYS_TIME
22
23 # endif
24
25 # define __ARCH_WANT_OLD_READDIR
26 # define __ARCH_WANT_OLD_STAT
27 # define __ARCH_WANT_SYS_ALARM
28 # define __ARCH_WANT_SYS_FADVISE64
29 # define __ARCH_WANT_SYS_GETHOSTNAME
30 # define __ARCH_WANT_SYS_GETPGRP
31 # define __ARCH_WANT_SYS_LLSEEK
32 # define __ARCH_WANT_SYS_NICE
33 # define __ARCH_WANT_SYS_OLDUMOUNT
34 # define __ARCH_WANT_SYS_OLD_GETRLIMIT
35 # define __ARCH_WANT_SYS_OLD_UNAME
36 # define __ARCH_WANT_SYS_PAUSE
37 # define __ARCH_WANT_SYS_RT_SIGACTION
38 # define __ARCH_WANT_SYS_RT_SIGSUSPEND
39 # define __ARCH_WANT_SYS_SGETMASK
40 # define __ARCH_WANT_SYS_SIGNAL
41 # define __ARCH_WANT_SYS_SIGPENDING
42 # define __ARCH_WANT_SYS_SIGPROCMASK
43 # define __ARCH_WANT_SYS_SOCKETCALL
44 # define __ARCH_WANT_SYS_TIME
45 # define __ARCH_WANT_SYS_UTIME
46 # define __ARCH_WANT_SYS_WAITPID
47
48 /*
49  * "Conditional" syscalls
50  *
51  * What we want is __attribute__((weak,alias("sys_ni_syscall"))),
52  * but it doesn't work on all toolchains, so we just do it by hand
53  */
54 # define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
55
56 #else
57 # ifdef __i386__
58 #  include <asm/unistd_32.h>
59 # elif defined(__LP64__)
60 #  include <asm/unistd_64.h>
61 # else
62 #  include <asm/unistd_x32.h>
63 # endif
64 #endif
65
66 #endif /* _ASM_X86_UNISTD_H */