blob: 7a48a55574702b1612501a28bbca81f48e8d9f19 [file] [log] [blame]
H. Peter Anvin303395a2011-11-11 16:07:41 -08001#ifndef _ASM_X86_UNISTD_H
2#define _ASM_X86_UNISTD_H 1
3
H. Peter Anvin6cbb3692012-02-14 14:38:31 -08004/* x32 syscall flag bit */
5#define __X32_SYSCALL_BIT 0x40000000
6
Thomas Gleixner96a388d2007-10-11 11:20:03 +02007#ifdef __KERNEL__
Adrian Bunkb11caa72008-04-20 22:02:17 +03008# ifdef CONFIG_X86_32
H. Peter Anvin303395a2011-11-11 16:07:41 -08009
10# include <asm/unistd_32.h>
11# define __ARCH_WANT_IPC_PARSE_VERSION
12# define __ARCH_WANT_STAT64
H. Peter Anvin4f2f81a2012-01-19 12:41:25 -080013# define __ARCH_WANT_SYS_IPC
H. Peter Anvin303395a2011-11-11 16:07:41 -080014# define __ARCH_WANT_SYS_OLD_MMAP
15# define __ARCH_WANT_SYS_OLD_SELECT
16
Adrian Bunkb11caa72008-04-20 22:02:17 +030017# else
H. Peter Anvin303395a2011-11-11 16:07:41 -080018
19# include <asm/unistd_64.h>
H. Peter Anvinea499fe2012-02-14 14:46:23 -080020# include <asm/unistd_64_x32.h>
H. Peter Anvin303395a2011-11-11 16:07:41 -080021# define __ARCH_WANT_COMPAT_SYS_TIME
22
Adrian Bunkb11caa72008-04-20 22:02:17 +030023# endif
H. Peter Anvin303395a2011-11-11 16:07:41 -080024
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
Adrian Bunkb11caa72008-04-20 22:02:17 +030056#else
57# ifdef __i386__
H. Peter Anvin303395a2011-11-11 16:07:41 -080058# include <asm/unistd_32.h>
H. Peter Anvin6cbb3692012-02-14 14:38:31 -080059# elif defined(__LP64__)
H. Peter Anvin303395a2011-11-11 16:07:41 -080060# include <asm/unistd_64.h>
H. Peter Anvin6cbb3692012-02-14 14:38:31 -080061# else
62# include <asm/unistd_x32.h>
Thomas Gleixner96a388d2007-10-11 11:20:03 +020063# endif
64#endif
H. Peter Anvin303395a2011-11-11 16:07:41 -080065
66#endif /* _ASM_X86_UNISTD_H */