diff options
author | David Howells <dhowells@redhat.com> | 2012-10-04 13:20:15 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2012-10-04 13:20:15 -0400 |
commit | 8a1ab3155c2ac7fbe5f2038d6e26efeb607a1498 (patch) | |
tree | 42ef93e164b8b2a01adab30db4b33f370f4280d7 /include/uapi/asm-generic | |
parent | f3dfd599af993385b40fc7a1c947afc12729bc4d (diff) |
UAPI: (Scripted) Disintegrate include/asm-generic
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'include/uapi/asm-generic')
36 files changed, 3065 insertions, 0 deletions
diff --git a/include/uapi/asm-generic/Kbuild b/include/uapi/asm-generic/Kbuild index aafaa5aa54d4..b73de7bb7a62 100644 --- a/include/uapi/asm-generic/Kbuild +++ b/include/uapi/asm-generic/Kbuild | |||
@@ -1 +1,36 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | header-y += auxvec.h | ||
3 | header-y += bitsperlong.h | ||
4 | header-y += errno-base.h | ||
5 | header-y += errno.h | ||
6 | header-y += fcntl.h | ||
7 | header-y += int-l64.h | ||
8 | header-y += int-ll64.h | ||
9 | header-y += ioctl.h | ||
10 | header-y += ioctls.h | ||
11 | header-y += ipcbuf.h | ||
12 | header-y += kvm_para.h | ||
13 | header-y += mman-common.h | ||
14 | header-y += mman.h | ||
15 | header-y += msgbuf.h | ||
16 | header-y += param.h | ||
17 | header-y += poll.h | ||
18 | header-y += posix_types.h | ||
19 | header-y += resource.h | ||
20 | header-y += sembuf.h | ||
21 | header-y += setup.h | ||
22 | header-y += shmbuf.h | ||
23 | header-y += shmparam.h | ||
24 | header-y += siginfo.h | ||
25 | header-y += signal-defs.h | ||
26 | header-y += signal.h | ||
27 | header-y += socket.h | ||
28 | header-y += sockios.h | ||
29 | header-y += stat.h | ||
30 | header-y += statfs.h | ||
31 | header-y += swab.h | ||
32 | header-y += termbits.h | ||
33 | header-y += termios.h | ||
34 | header-y += types.h | ||
35 | header-y += ucontext.h | ||
36 | header-y += unistd.h | ||
diff --git a/include/uapi/asm-generic/auxvec.h b/include/uapi/asm-generic/auxvec.h new file mode 100644 index 000000000000..b99573b0ad12 --- /dev/null +++ b/include/uapi/asm-generic/auxvec.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef __ASM_GENERIC_AUXVEC_H | ||
2 | #define __ASM_GENERIC_AUXVEC_H | ||
3 | /* | ||
4 | * Not all architectures need their own auxvec.h, the most | ||
5 | * common definitions are already in linux/auxvec.h. | ||
6 | */ | ||
7 | |||
8 | #endif /* __ASM_GENERIC_AUXVEC_H */ | ||
diff --git a/include/uapi/asm-generic/bitsperlong.h b/include/uapi/asm-generic/bitsperlong.h new file mode 100644 index 000000000000..23e6c416b85f --- /dev/null +++ b/include/uapi/asm-generic/bitsperlong.h | |||
@@ -0,0 +1,15 @@ | |||
1 | #ifndef _UAPI__ASM_GENERIC_BITS_PER_LONG | ||
2 | #define _UAPI__ASM_GENERIC_BITS_PER_LONG | ||
3 | |||
4 | /* | ||
5 | * There seems to be no way of detecting this automatically from user | ||
6 | * space, so 64 bit architectures should override this in their | ||
7 | * bitsperlong.h. In particular, an architecture that supports | ||
8 | * both 32 and 64 bit user space must not rely on CONFIG_64BIT | ||
9 | * to decide it, but rather check a compiler provided macro. | ||
10 | */ | ||
11 | #ifndef __BITS_PER_LONG | ||
12 | #define __BITS_PER_LONG 32 | ||
13 | #endif | ||
14 | |||
15 | #endif /* _UAPI__ASM_GENERIC_BITS_PER_LONG */ | ||
diff --git a/include/uapi/asm-generic/errno-base.h b/include/uapi/asm-generic/errno-base.h new file mode 100644 index 000000000000..65115978510f --- /dev/null +++ b/include/uapi/asm-generic/errno-base.h | |||
@@ -0,0 +1,39 @@ | |||
1 | #ifndef _ASM_GENERIC_ERRNO_BASE_H | ||
2 | #define _ASM_GENERIC_ERRNO_BASE_H | ||
3 | |||
4 | #define EPERM 1 /* Operation not permitted */ | ||
5 | #define ENOENT 2 /* No such file or directory */ | ||
6 | #define ESRCH 3 /* No such process */ | ||
7 | #define EINTR 4 /* Interrupted system call */ | ||
8 | #define EIO 5 /* I/O error */ | ||
9 | #define ENXIO 6 /* No such device or address */ | ||
10 | #define E2BIG 7 /* Argument list too long */ | ||
11 | #define ENOEXEC 8 /* Exec format error */ | ||
12 | #define EBADF 9 /* Bad file number */ | ||
13 | #define ECHILD 10 /* No child processes */ | ||
14 | #define EAGAIN 11 /* Try again */ | ||
15 | #define ENOMEM 12 /* Out of memory */ | ||
16 | #define EACCES 13 /* Permission denied */ | ||
17 | #define EFAULT 14 /* Bad address */ | ||
18 | #define ENOTBLK 15 /* Block device required */ | ||
19 | #define EBUSY 16 /* Device or resource busy */ | ||
20 | #define EEXIST 17 /* File exists */ | ||
21 | #define EXDEV 18 /* Cross-device link */ | ||
22 | #define ENODEV 19 /* No such device */ | ||
23 | #define ENOTDIR 20 /* Not a directory */ | ||
24 | #define EISDIR 21 /* Is a directory */ | ||
25 | #define EINVAL 22 /* Invalid argument */ | ||
26 | #define ENFILE 23 /* File table overflow */ | ||
27 | #define EMFILE 24 /* Too many open files */ | ||
28 | #define ENOTTY 25 /* Not a typewriter */ | ||
29 | #define ETXTBSY 26 /* Text file busy */ | ||
30 | #define EFBIG 27 /* File too large */ | ||
31 | #define ENOSPC 28 /* No space left on device */ | ||
32 | #define ESPIPE 29 /* Illegal seek */ | ||
33 | #define EROFS 30 /* Read-only file system */ | ||
34 | #define EMLINK 31 /* Too many links */ | ||
35 | #define EPIPE 32 /* Broken pipe */ | ||
36 | #define EDOM 33 /* Math argument out of domain of func */ | ||
37 | #define ERANGE 34 /* Math result not representable */ | ||
38 | |||
39 | #endif | ||
diff --git a/include/uapi/asm-generic/errno.h b/include/uapi/asm-generic/errno.h new file mode 100644 index 000000000000..a1331ce50445 --- /dev/null +++ b/include/uapi/asm-generic/errno.h | |||
@@ -0,0 +1,113 @@ | |||
1 | #ifndef _ASM_GENERIC_ERRNO_H | ||
2 | #define _ASM_GENERIC_ERRNO_H | ||
3 | |||
4 | #include <asm-generic/errno-base.h> | ||
5 | |||
6 | #define EDEADLK 35 /* Resource deadlock would occur */ | ||
7 | #define ENAMETOOLONG 36 /* File name too long */ | ||
8 | #define ENOLCK 37 /* No record locks available */ | ||
9 | #define ENOSYS 38 /* Function not implemented */ | ||
10 | #define ENOTEMPTY 39 /* Directory not empty */ | ||
11 | #define ELOOP 40 /* Too many symbolic links encountered */ | ||
12 | #define EWOULDBLOCK EAGAIN /* Operation would block */ | ||
13 | #define ENOMSG 42 /* No message of desired type */ | ||
14 | #define EIDRM 43 /* Identifier removed */ | ||
15 | #define ECHRNG 44 /* Channel number out of range */ | ||
16 | #define EL2NSYNC 45 /* Level 2 not synchronized */ | ||
17 | #define EL3HLT 46 /* Level 3 halted */ | ||
18 | #define EL3RST 47 /* Level 3 reset */ | ||
19 | #define ELNRNG 48 /* Link number out of range */ | ||
20 | #define EUNATCH 49 /* Protocol driver not attached */ | ||
21 | #define ENOCSI 50 /* No CSI structure available */ | ||
22 | #define EL2HLT 51 /* Level 2 halted */ | ||
23 | #define EBADE 52 /* Invalid exchange */ | ||
24 | #define EBADR 53 /* Invalid request descriptor */ | ||
25 | #define EXFULL 54 /* Exchange full */ | ||
26 | #define ENOANO 55 /* No anode */ | ||
27 | #define EBADRQC 56 /* Invalid request code */ | ||
28 | #define EBADSLT 57 /* Invalid slot */ | ||
29 | |||
30 | #define EDEADLOCK EDEADLK | ||
31 | |||
32 | #define EBFONT 59 /* Bad font file format */ | ||
33 | #define ENOSTR 60 /* Device not a stream */ | ||
34 | #define ENODATA 61 /* No data available */ | ||
35 | #define ETIME 62 /* Timer expired */ | ||
36 | #define ENOSR 63 /* Out of streams resources */ | ||
37 | #define ENONET 64 /* Machine is not on the network */ | ||
38 | #define ENOPKG 65 /* Package not installed */ | ||
39 | #define EREMOTE 66 /* Object is remote */ | ||
40 | #define ENOLINK 67 /* Link has been severed */ | ||
41 | #define EADV 68 /* Advertise error */ | ||
42 | #define ESRMNT 69 /* Srmount error */ | ||
43 | #define ECOMM 70 /* Communication error on send */ | ||
44 | #define EPROTO 71 /* Protocol error */ | ||
45 | #define EMULTIHOP 72 /* Multihop attempted */ | ||
46 | #define EDOTDOT 73 /* RFS specific error */ | ||
47 | #define EBADMSG 74 /* Not a data message */ | ||
48 | #define EOVERFLOW 75 /* Value too large for defined data type */ | ||
49 | #define ENOTUNIQ 76 /* Name not unique on network */ | ||
50 | #define EBADFD 77 /* File descriptor in bad state */ | ||
51 | #define EREMCHG 78 /* Remote address changed */ | ||
52 | #define ELIBACC 79 /* Can not access a needed shared library */ | ||
53 | #define ELIBBAD 80 /* Accessing a corrupted shared library */ | ||
54 | #define ELIBSCN 81 /* .lib section in a.out corrupted */ | ||
55 | #define ELIBMAX 82 /* Attempting to link in too many shared libraries */ | ||
56 | #define ELIBEXEC 83 /* Cannot exec a shared library directly */ | ||
57 | #define EILSEQ 84 /* Illegal byte sequence */ | ||
58 | #define ERESTART 85 /* Interrupted system call should be restarted */ | ||
59 | #define ESTRPIPE 86 /* Streams pipe error */ | ||
60 | #define EUSERS 87 /* Too many users */ | ||
61 | #define ENOTSOCK 88 /* Socket operation on non-socket */ | ||
62 | #define EDESTADDRREQ 89 /* Destination address required */ | ||
63 | #define EMSGSIZE 90 /* Message too long */ | ||
64 | #define EPROTOTYPE 91 /* Protocol wrong type for socket */ | ||
65 | #define ENOPROTOOPT 92 /* Protocol not available */ | ||
66 | #define EPROTONOSUPPORT 93 /* Protocol not supported */ | ||
67 | #define ESOCKTNOSUPPORT 94 /* Socket type not supported */ | ||
68 | #define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ | ||
69 | #define EPFNOSUPPORT 96 /* Protocol family not supported */ | ||
70 | #define EAFNOSUPPORT 97 /* Address family not supported by protocol */ | ||
71 | #define EADDRINUSE 98 /* Address already in use */ | ||
72 | #define EADDRNOTAVAIL 99 /* Cannot assign requested address */ | ||
73 | #define ENETDOWN 100 /* Network is down */ | ||
74 | #define ENETUNREACH 101 /* Network is unreachable */ | ||
75 | #define ENETRESET 102 /* Network dropped connection because of reset */ | ||
76 | #define ECONNABORTED 103 /* Software caused connection abort */ | ||
77 | #define ECONNRESET 104 /* Connection reset by peer */ | ||
78 | #define ENOBUFS 105 /* No buffer space available */ | ||
79 | #define EISCONN 106 /* Transport endpoint is already connected */ | ||
80 | #define ENOTCONN 107 /* Transport endpoint is not connected */ | ||
81 | #define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ | ||
82 | #define ETOOMANYREFS 109 /* Too many references: cannot splice */ | ||
83 | #define ETIMEDOUT 110 /* Connection timed out */ | ||
84 | #define ECONNREFUSED 111 /* Connection refused */ | ||
85 | #define EHOSTDOWN 112 /* Host is down */ | ||
86 | #define EHOSTUNREACH 113 /* No route to host */ | ||
87 | #define EALREADY 114 /* Operation already in progress */ | ||
88 | #define EINPROGRESS 115 /* Operation now in progress */ | ||
89 | #define ESTALE 116 /* Stale NFS file handle */ | ||
90 | #define EUCLEAN 117 /* Structure needs cleaning */ | ||
91 | #define ENOTNAM 118 /* Not a XENIX named type file */ | ||
92 | #define ENAVAIL 119 /* No XENIX semaphores available */ | ||
93 | #define EISNAM 120 /* Is a named type file */ | ||
94 | #define EREMOTEIO 121 /* Remote I/O error */ | ||
95 | #define EDQUOT 122 /* Quota exceeded */ | ||
96 | |||
97 | #define ENOMEDIUM 123 /* No medium found */ | ||
98 | #define EMEDIUMTYPE 124 /* Wrong medium type */ | ||
99 | #define ECANCELED 125 /* Operation Canceled */ | ||
100 | #define ENOKEY 126 /* Required key not available */ | ||
101 | #define EKEYEXPIRED 127 /* Key has expired */ | ||
102 | #define EKEYREVOKED 128 /* Key has been revoked */ | ||
103 | #define EKEYREJECTED 129 /* Key was rejected by service */ | ||
104 | |||
105 | /* for robust mutexes */ | ||
106 | #define EOWNERDEAD 130 /* Owner died */ | ||
107 | #define ENOTRECOVERABLE 131 /* State not recoverable */ | ||
108 | |||
109 | #define ERFKILL 132 /* Operation not possible due to RF-kill */ | ||
110 | |||
111 | #define EHWPOISON 133 /* Memory page has hardware error */ | ||
112 | |||
113 | #endif | ||
diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h new file mode 100644 index 000000000000..a48937d4a5ea --- /dev/null +++ b/include/uapi/asm-generic/fcntl.h | |||
@@ -0,0 +1,199 @@ | |||
1 | #ifndef _ASM_GENERIC_FCNTL_H | ||
2 | #define _ASM_GENERIC_FCNTL_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | /* | ||
7 | * FMODE_EXEC is 0x20 | ||
8 | * FMODE_NONOTIFY is 0x1000000 | ||
9 | * These cannot be used by userspace O_* until internal and external open | ||
10 | * flags are split. | ||
11 | * -Eric Paris | ||
12 | */ | ||
13 | |||
14 | /* | ||
15 | * When introducing new O_* bits, please check its uniqueness in fcntl_init(). | ||
16 | */ | ||
17 | |||
18 | #define O_ACCMODE 00000003 | ||
19 | #define O_RDONLY 00000000 | ||
20 | #define O_WRONLY 00000001 | ||
21 | #define O_RDWR 00000002 | ||
22 | #ifndef O_CREAT | ||
23 | #define O_CREAT 00000100 /* not fcntl */ | ||
24 | #endif | ||
25 | #ifndef O_EXCL | ||
26 | #define O_EXCL 00000200 /* not fcntl */ | ||
27 | #endif | ||
28 | #ifndef O_NOCTTY | ||
29 | #define O_NOCTTY 00000400 /* not fcntl */ | ||
30 | #endif | ||
31 | #ifndef O_TRUNC | ||
32 | #define O_TRUNC 00001000 /* not fcntl */ | ||
33 | #endif | ||
34 | #ifndef O_APPEND | ||
35 | #define O_APPEND 00002000 | ||
36 | #endif | ||
37 | #ifndef O_NONBLOCK | ||
38 | #define O_NONBLOCK 00004000 | ||
39 | #endif | ||
40 | #ifndef O_DSYNC | ||
41 | #define O_DSYNC 00010000 /* used to be O_SYNC, see below */ | ||
42 | #endif | ||
43 | #ifndef FASYNC | ||
44 | #define FASYNC 00020000 /* fcntl, for BSD compatibility */ | ||
45 | #endif | ||
46 | #ifndef O_DIRECT | ||
47 | #define O_DIRECT 00040000 /* direct disk access hint */ | ||
48 | #endif | ||
49 | #ifndef O_LARGEFILE | ||
50 | #define O_LARGEFILE 00100000 | ||
51 | #endif | ||
52 | #ifndef O_DIRECTORY | ||
53 | #define O_DIRECTORY 00200000 /* must be a directory */ | ||
54 | #endif | ||
55 | #ifndef O_NOFOLLOW | ||
56 | #define O_NOFOLLOW 00400000 /* don't follow links */ | ||
57 | #endif | ||
58 | #ifndef O_NOATIME | ||
59 | #define O_NOATIME 01000000 | ||
60 | #endif | ||
61 | #ifndef O_CLOEXEC | ||
62 | #define O_CLOEXEC 02000000 /* set close_on_exec */ | ||
63 | #endif | ||
64 | |||
65 | /* | ||
66 | * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using | ||
67 | * the O_SYNC flag. We continue to use the existing numerical value | ||
68 | * for O_DSYNC semantics now, but using the correct symbolic name for it. | ||
69 | * This new value is used to request true Posix O_SYNC semantics. It is | ||
70 | * defined in this strange way to make sure applications compiled against | ||
71 | * new headers get at least O_DSYNC semantics on older kernels. | ||
72 | * | ||
73 | * This has the nice side-effect that we can simply test for O_DSYNC | ||
74 | * wherever we do not care if O_DSYNC or O_SYNC is used. | ||
75 | * | ||
76 | * Note: __O_SYNC must never be used directly. | ||
77 | */ | ||
78 | #ifndef O_SYNC | ||
79 | #define __O_SYNC 04000000 | ||
80 | #define O_SYNC (__O_SYNC|O_DSYNC) | ||
81 | #endif | ||
82 | |||
83 | #ifndef O_PATH | ||
84 | #define O_PATH 010000000 | ||
85 | #endif | ||
86 | |||
87 | #ifndef O_NDELAY | ||
88 | #define O_NDELAY O_NONBLOCK | ||
89 | #endif | ||
90 | |||
91 | #define F_DUPFD 0 /* dup */ | ||
92 | #define F_GETFD 1 /* get close_on_exec */ | ||
93 | #define F_SETFD 2 /* set/clear close_on_exec */ | ||
94 | #define F_GETFL 3 /* get file->f_flags */ | ||
95 | #define F_SETFL 4 /* set file->f_flags */ | ||
96 | #ifndef F_GETLK | ||
97 | #define F_GETLK 5 | ||
98 | #define F_SETLK 6 | ||
99 | #define F_SETLKW 7 | ||
100 | #endif | ||
101 | #ifndef F_SETOWN | ||
102 | #define F_SETOWN 8 /* for sockets. */ | ||
103 | #define F_GETOWN 9 /* for sockets. */ | ||
104 | #endif | ||
105 | #ifndef F_SETSIG | ||
106 | #define F_SETSIG 10 /* for sockets. */ | ||
107 | #define F_GETSIG 11 /* for sockets. */ | ||
108 | #endif | ||
109 | |||
110 | #ifndef CONFIG_64BIT | ||
111 | #ifndef F_GETLK64 | ||
112 | #define F_GETLK64 12 /* using 'struct flock64' */ | ||
113 | #define F_SETLK64 13 | ||
114 | #define F_SETLKW64 14 | ||
115 | #endif | ||
116 | #endif | ||
117 | |||
118 | #ifndef F_SETOWN_EX | ||
119 | #define F_SETOWN_EX 15 | ||
120 | #define F_GETOWN_EX 16 | ||
121 | #endif | ||
122 | |||
123 | #ifndef F_GETOWNER_UIDS | ||
124 | #define F_GETOWNER_UIDS 17 | ||
125 | #endif | ||
126 | |||
127 | #define F_OWNER_TID 0 | ||
128 | #define F_OWNER_PID 1 | ||
129 | #define F_OWNER_PGRP 2 | ||
130 | |||
131 | struct f_owner_ex { | ||
132 | int type; | ||
133 | __kernel_pid_t pid; | ||
134 | }; | ||
135 | |||
136 | /* for F_[GET|SET]FL */ | ||
137 | #define FD_CLOEXEC 1 /* actually anything with low bit set goes */ | ||
138 | |||
139 | /* for posix fcntl() and lockf() */ | ||
140 | #ifndef F_RDLCK | ||
141 | #define F_RDLCK 0 | ||
142 | #define F_WRLCK 1 | ||
143 | #define F_UNLCK 2 | ||
144 | #endif | ||
145 | |||
146 | /* for old implementation of bsd flock () */ | ||
147 | #ifndef F_EXLCK | ||
148 | #define F_EXLCK 4 /* or 3 */ | ||
149 | #define F_SHLCK 8 /* or 4 */ | ||
150 | #endif | ||
151 | |||
152 | /* operations for bsd flock(), also used by the kernel implementation */ | ||
153 | #define LOCK_SH 1 /* shared lock */ | ||
154 | #define LOCK_EX 2 /* exclusive lock */ | ||
155 | #define LOCK_NB 4 /* or'd with one of the above to prevent | ||
156 | blocking */ | ||
157 | #define LOCK_UN 8 /* remove lock */ | ||
158 | |||
159 | #define LOCK_MAND 32 /* This is a mandatory flock ... */ | ||
160 | #define LOCK_READ 64 /* which allows concurrent read operations */ | ||
161 | #define LOCK_WRITE 128 /* which allows concurrent write operations */ | ||
162 | #define LOCK_RW 192 /* which allows concurrent read & write ops */ | ||
163 | |||
164 | #define F_LINUX_SPECIFIC_BASE 1024 | ||
165 | |||
166 | #ifndef HAVE_ARCH_STRUCT_FLOCK | ||
167 | #ifndef __ARCH_FLOCK_PAD | ||
168 | #define __ARCH_FLOCK_PAD | ||
169 | #endif | ||
170 | |||
171 | struct flock { | ||
172 | short l_type; | ||
173 | short l_whence; | ||
174 | __kernel_off_t l_start; | ||
175 | __kernel_off_t l_len; | ||
176 | __kernel_pid_t l_pid; | ||
177 | __ARCH_FLOCK_PAD | ||
178 | }; | ||
179 | #endif | ||
180 | |||
181 | #ifndef CONFIG_64BIT | ||
182 | |||
183 | #ifndef HAVE_ARCH_STRUCT_FLOCK64 | ||
184 | #ifndef __ARCH_FLOCK64_PAD | ||
185 | #define __ARCH_FLOCK64_PAD | ||
186 | #endif | ||
187 | |||
188 | struct flock64 { | ||
189 | short l_type; | ||
190 | short l_whence; | ||
191 | __kernel_loff_t l_start; | ||
192 | __kernel_loff_t l_len; | ||
193 | __kernel_pid_t l_pid; | ||
194 | __ARCH_FLOCK64_PAD | ||
195 | }; | ||
196 | #endif | ||
197 | #endif /* !CONFIG_64BIT */ | ||
198 | |||
199 | #endif /* _ASM_GENERIC_FCNTL_H */ | ||
diff --git a/include/uapi/asm-generic/int-l64.h b/include/uapi/asm-generic/int-l64.h new file mode 100644 index 000000000000..978f21cae2f4 --- /dev/null +++ b/include/uapi/asm-generic/int-l64.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * asm-generic/int-l64.h | ||
3 | * | ||
4 | * Integer declarations for architectures which use "long" | ||
5 | * for 64-bit types. | ||
6 | */ | ||
7 | |||
8 | #ifndef _UAPI_ASM_GENERIC_INT_L64_H | ||
9 | #define _UAPI_ASM_GENERIC_INT_L64_H | ||
10 | |||
11 | #include <asm/bitsperlong.h> | ||
12 | |||
13 | #ifndef __ASSEMBLY__ | ||
14 | /* | ||
15 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
16 | * header files exported to user space | ||
17 | */ | ||
18 | |||
19 | typedef __signed__ char __s8; | ||
20 | typedef unsigned char __u8; | ||
21 | |||
22 | typedef __signed__ short __s16; | ||
23 | typedef unsigned short __u16; | ||
24 | |||
25 | typedef __signed__ int __s32; | ||
26 | typedef unsigned int __u32; | ||
27 | |||
28 | typedef __signed__ long __s64; | ||
29 | typedef unsigned long __u64; | ||
30 | |||
31 | #endif /* __ASSEMBLY__ */ | ||
32 | |||
33 | |||
34 | #endif /* _UAPI_ASM_GENERIC_INT_L64_H */ | ||
diff --git a/include/uapi/asm-generic/int-ll64.h b/include/uapi/asm-generic/int-ll64.h new file mode 100644 index 000000000000..a8658b2423ba --- /dev/null +++ b/include/uapi/asm-generic/int-ll64.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * asm-generic/int-ll64.h | ||
3 | * | ||
4 | * Integer declarations for architectures which use "long long" | ||
5 | * for 64-bit types. | ||
6 | */ | ||
7 | |||
8 | #ifndef _UAPI_ASM_GENERIC_INT_LL64_H | ||
9 | #define _UAPI_ASM_GENERIC_INT_LL64_H | ||
10 | |||
11 | #include <asm/bitsperlong.h> | ||
12 | |||
13 | #ifndef __ASSEMBLY__ | ||
14 | /* | ||
15 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the | ||
16 | * header files exported to user space | ||
17 | */ | ||
18 | |||
19 | typedef __signed__ char __s8; | ||
20 | typedef unsigned char __u8; | ||
21 | |||
22 | typedef __signed__ short __s16; | ||
23 | typedef unsigned short __u16; | ||
24 | |||
25 | typedef __signed__ int __s32; | ||
26 | typedef unsigned int __u32; | ||
27 | |||
28 | #ifdef __GNUC__ | ||
29 | __extension__ typedef __signed__ long long __s64; | ||
30 | __extension__ typedef unsigned long long __u64; | ||
31 | #else | ||
32 | typedef __signed__ long long __s64; | ||
33 | typedef unsigned long long __u64; | ||
34 | #endif | ||
35 | |||
36 | #endif /* __ASSEMBLY__ */ | ||
37 | |||
38 | |||
39 | #endif /* _UAPI_ASM_GENERIC_INT_LL64_H */ | ||
diff --git a/include/uapi/asm-generic/ioctl.h b/include/uapi/asm-generic/ioctl.h new file mode 100644 index 000000000000..7e7c11b52143 --- /dev/null +++ b/include/uapi/asm-generic/ioctl.h | |||
@@ -0,0 +1,98 @@ | |||
1 | #ifndef _UAPI_ASM_GENERIC_IOCTL_H | ||
2 | #define _UAPI_ASM_GENERIC_IOCTL_H | ||
3 | |||
4 | /* ioctl command encoding: 32 bits total, command in lower 16 bits, | ||
5 | * size of the parameter structure in the lower 14 bits of the | ||
6 | * upper 16 bits. | ||
7 | * Encoding the size of the parameter structure in the ioctl request | ||
8 | * is useful for catching programs compiled with old versions | ||
9 | * and to avoid overwriting user space outside the user buffer area. | ||
10 | * The highest 2 bits are reserved for indicating the ``access mode''. | ||
11 | * NOTE: This limits the max parameter size to 16kB -1 ! | ||
12 | */ | ||
13 | |||
14 | /* | ||
15 | * The following is for compatibility across the various Linux | ||
16 | * platforms. The generic ioctl numbering scheme doesn't really enforce | ||
17 | * a type field. De facto, however, the top 8 bits of the lower 16 | ||
18 | * bits are indeed used as a type field, so we might just as well make | ||
19 | * this explicit here. Please be sure to use the decoding macros | ||
20 | * below from now on. | ||
21 | */ | ||
22 | #define _IOC_NRBITS 8 | ||
23 | #define _IOC_TYPEBITS 8 | ||
24 | |||
25 | /* | ||
26 | * Let any architecture override either of the following before | ||
27 | * including this file. | ||
28 | */ | ||
29 | |||
30 | #ifndef _IOC_SIZEBITS | ||
31 | # define _IOC_SIZEBITS 14 | ||
32 | #endif | ||
33 | |||
34 | #ifndef _IOC_DIRBITS | ||
35 | # define _IOC_DIRBITS 2 | ||
36 | #endif | ||
37 | |||
38 | #define _IOC_NRMASK ((1 << _IOC_NRBITS)-1) | ||
39 | #define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1) | ||
40 | #define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1) | ||
41 | #define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1) | ||
42 | |||
43 | #define _IOC_NRSHIFT 0 | ||
44 | #define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS) | ||
45 | #define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS) | ||
46 | #define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS) | ||
47 | |||
48 | /* | ||
49 | * Direction bits, which any architecture can choose to override | ||
50 | * before including this file. | ||
51 | */ | ||
52 | |||
53 | #ifndef _IOC_NONE | ||
54 | # define _IOC_NONE 0U | ||
55 | #endif | ||
56 | |||
57 | #ifndef _IOC_WRITE | ||
58 | # define _IOC_WRITE 1U | ||
59 | #endif | ||
60 | |||
61 | #ifndef _IOC_READ | ||
62 | # define _IOC_READ 2U | ||
63 | #endif | ||
64 | |||
65 | #define _IOC(dir,type,nr,size) \ | ||
66 | (((dir) << _IOC_DIRSHIFT) | \ | ||
67 | ((type) << _IOC_TYPESHIFT) | \ | ||
68 | ((nr) << _IOC_NRSHIFT) | \ | ||
69 | ((size) << _IOC_SIZESHIFT)) | ||
70 | |||
71 | #ifndef __KERNEL__ | ||
72 | #define _IOC_TYPECHECK(t) (sizeof(t)) | ||
73 | #endif | ||
74 | |||
75 | /* used to create numbers */ | ||
76 | #define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) | ||
77 | #define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(size))) | ||
78 | #define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) | ||
79 | #define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),(_IOC_TYPECHECK(size))) | ||
80 | #define _IOR_BAD(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size)) | ||
81 | #define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size)) | ||
82 | #define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size)) | ||
83 | |||
84 | /* used to decode ioctl numbers.. */ | ||
85 | #define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) | ||
86 | #define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) | ||
87 | #define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) | ||
88 | #define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) | ||
89 | |||
90 | /* ...and for the drivers/sound files... */ | ||
91 | |||
92 | #define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) | ||
93 | #define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) | ||
94 | #define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT) | ||
95 | #define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) | ||
96 | #define IOCSIZE_SHIFT (_IOC_SIZESHIFT) | ||
97 | |||
98 | #endif /* _UAPI_ASM_GENERIC_IOCTL_H */ | ||
diff --git a/include/uapi/asm-generic/ioctls.h b/include/uapi/asm-generic/ioctls.h new file mode 100644 index 000000000000..199975fac395 --- /dev/null +++ b/include/uapi/asm-generic/ioctls.h | |||
@@ -0,0 +1,114 @@ | |||
1 | #ifndef __ASM_GENERIC_IOCTLS_H | ||
2 | #define __ASM_GENERIC_IOCTLS_H | ||
3 | |||
4 | #include <linux/ioctl.h> | ||
5 | |||
6 | /* | ||
7 | * These are the most common definitions for tty ioctl numbers. | ||
8 | * Most of them do not use the recommended _IOC(), but there is | ||
9 | * probably some source code out there hardcoding the number, | ||
10 | * so we might as well use them for all new platforms. | ||
11 | * | ||
12 | * The architectures that use different values here typically | ||
13 | * try to be compatible with some Unix variants for the same | ||
14 | * architecture. | ||
15 | */ | ||
16 | |||
17 | /* 0x54 is just a magic number to make these relatively unique ('T') */ | ||
18 | |||
19 | #define TCGETS 0x5401 | ||
20 | #define TCSETS 0x5402 | ||
21 | #define TCSETSW 0x5403 | ||
22 | #define TCSETSF 0x5404 | ||
23 | #define TCGETA 0x5405 | ||
24 | #define TCSETA 0x5406 | ||
25 | #define TCSETAW 0x5407 | ||
26 | #define TCSETAF 0x5408 | ||
27 | #define TCSBRK 0x5409 | ||
28 | #define TCXONC 0x540A | ||
29 | #define TCFLSH 0x540B | ||
30 | #define TIOCEXCL 0x540C | ||
31 | #define TIOCNXCL 0x540D | ||
32 | #define TIOCSCTTY 0x540E | ||
33 | #define TIOCGPGRP 0x540F | ||
34 | #define TIOCSPGRP 0x5410 | ||
35 | #define TIOCOUTQ 0x5411 | ||
36 | #define TIOCSTI 0x5412 | ||
37 | #define TIOCGWINSZ 0x5413 | ||
38 | #define TIOCSWINSZ 0x5414 | ||
39 | #define TIOCMGET 0x5415 | ||
40 | #define TIOCMBIS 0x5416 | ||
41 | #define TIOCMBIC 0x5417 | ||
42 | #define TIOCMSET 0x5418 | ||
43 | #define TIOCGSOFTCAR 0x5419 | ||
44 | #define TIOCSSOFTCAR 0x541A | ||
45 | #define FIONREAD 0x541B | ||
46 | #define TIOCINQ FIONREAD | ||
47 | #define TIOCLINUX 0x541C | ||
48 | #define TIOCCONS 0x541D | ||
49 | #define TIOCGSERIAL 0x541E | ||
50 | #define TIOCSSERIAL 0x541F | ||
51 | #define TIOCPKT 0x5420 | ||
52 | #define FIONBIO 0x5421 | ||
53 | #define TIOCNOTTY 0x5422 | ||
54 | #define TIOCSETD 0x5423 | ||
55 | #define TIOCGETD 0x5424 | ||
56 | #define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ | ||
57 | #define TIOCSBRK 0x5427 /* BSD compatibility */ | ||
58 | #define TIOCCBRK 0x5428 /* BSD compatibility */ | ||
59 | #define TIOCGSID 0x5429 /* Return the session ID of FD */ | ||
60 | #define TCGETS2 _IOR('T', 0x2A, struct termios2) | ||
61 | #define TCSETS2 _IOW('T', 0x2B, struct termios2) | ||
62 | #define TCSETSW2 _IOW('T', 0x2C, struct termios2) | ||
63 | #define TCSETSF2 _IOW('T', 0x2D, struct termios2) | ||
64 | #define TIOCGRS485 0x542E | ||
65 | #ifndef TIOCSRS485 | ||
66 | #define TIOCSRS485 0x542F | ||
67 | #endif | ||
68 | #define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | ||
69 | #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ | ||
70 | #define TIOCGDEV _IOR('T', 0x32, unsigned int) /* Get primary device node of /dev/console */ | ||
71 | #define TCGETX 0x5432 /* SYS5 TCGETX compatibility */ | ||
72 | #define TCSETX 0x5433 | ||
73 | #define TCSETXF 0x5434 | ||
74 | #define TCSETXW 0x5435 | ||
75 | #define TIOCSIG _IOW('T', 0x36, int) /* pty: generate signal */ | ||
76 | #define TIOCVHANGUP 0x5437 | ||
77 | |||
78 | #define FIONCLEX 0x5450 | ||
79 | #define FIOCLEX 0x5451 | ||
80 | #define FIOASYNC 0x5452 | ||
81 | #define TIOCSERCONFIG 0x5453 | ||
82 | #define TIOCSERGWILD 0x5454 | ||
83 | #define TIOCSERSWILD 0x5455 | ||
84 | #define TIOCGLCKTRMIOS 0x5456 | ||
85 | #define TIOCSLCKTRMIOS 0x5457 | ||
86 | #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ | ||
87 | #define TIOCSERGETLSR 0x5459 /* Get line status register */ | ||
88 | #define TIOCSERGETMULTI 0x545A /* Get multiport config */ | ||
89 | #define TIOCSERSETMULTI 0x545B /* Set multiport config */ | ||
90 | |||
91 | #define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ | ||
92 | #define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ | ||
93 | |||
94 | /* | ||
95 | * Some arches already define FIOQSIZE due to a historical | ||
96 | * conflict with a Hayes modem-specific ioctl value. | ||
97 | */ | ||
98 | #ifndef FIOQSIZE | ||
99 | # define FIOQSIZE 0x5460 | ||
100 | #endif | ||
101 | |||
102 | /* Used for packet mode */ | ||
103 | #define TIOCPKT_DATA 0 | ||
104 | #define TIOCPKT_FLUSHREAD 1 | ||
105 | #define TIOCPKT_FLUSHWRITE 2 | ||
106 | #define TIOCPKT_STOP 4 | ||
107 | #define TIOCPKT_START 8 | ||
108 | #define TIOCPKT_NOSTOP 16 | ||
109 | #define TIOCPKT_DOSTOP 32 | ||
110 | #define TIOCPKT_IOCTL 64 | ||
111 | |||
112 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | ||
113 | |||
114 | #endif /* __ASM_GENERIC_IOCTLS_H */ | ||
diff --git a/include/uapi/asm-generic/ipcbuf.h b/include/uapi/asm-generic/ipcbuf.h new file mode 100644 index 000000000000..76982b2a1b58 --- /dev/null +++ b/include/uapi/asm-generic/ipcbuf.h | |||
@@ -0,0 +1,34 @@ | |||
1 | #ifndef __ASM_GENERIC_IPCBUF_H | ||
2 | #define __ASM_GENERIC_IPCBUF_H | ||
3 | |||
4 | /* | ||
5 | * The generic ipc64_perm structure: | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * ipc64_perm was originally meant to be architecture specific, but | ||
10 | * everyone just ended up making identical copies without specific | ||
11 | * optimizations, so we may just as well all use the same one. | ||
12 | * | ||
13 | * Pad space is left for: | ||
14 | * - 32-bit mode_t on architectures that only had 16 bit | ||
15 | * - 32-bit seq | ||
16 | * - 2 miscellaneous 32-bit values | ||
17 | */ | ||
18 | |||
19 | struct ipc64_perm { | ||
20 | __kernel_key_t key; | ||
21 | __kernel_uid32_t uid; | ||
22 | __kernel_gid32_t gid; | ||
23 | __kernel_uid32_t cuid; | ||
24 | __kernel_gid32_t cgid; | ||
25 | __kernel_mode_t mode; | ||
26 | /* pad if mode_t is u16: */ | ||
27 | unsigned char __pad1[4 - sizeof(__kernel_mode_t)]; | ||
28 | unsigned short seq; | ||
29 | unsigned short __pad2; | ||
30 | unsigned long __unused1; | ||
31 | unsigned long __unused2; | ||
32 | }; | ||
33 | |||
34 | #endif /* __ASM_GENERIC_IPCBUF_H */ | ||
diff --git a/include/uapi/asm-generic/kvm_para.h b/include/uapi/asm-generic/kvm_para.h new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/include/uapi/asm-generic/kvm_para.h | |||
diff --git a/include/uapi/asm-generic/mman-common.h b/include/uapi/asm-generic/mman-common.h new file mode 100644 index 000000000000..d030d2c2647a --- /dev/null +++ b/include/uapi/asm-generic/mman-common.h | |||
@@ -0,0 +1,58 @@ | |||
1 | #ifndef __ASM_GENERIC_MMAN_COMMON_H | ||
2 | #define __ASM_GENERIC_MMAN_COMMON_H | ||
3 | |||
4 | /* | ||
5 | Author: Michael S. Tsirkin <mst@mellanox.co.il>, Mellanox Technologies Ltd. | ||
6 | Based on: asm-xxx/mman.h | ||
7 | */ | ||
8 | |||
9 | #define PROT_READ 0x1 /* page can be read */ | ||
10 | #define PROT_WRITE 0x2 /* page can be written */ | ||
11 | #define PROT_EXEC 0x4 /* page can be executed */ | ||
12 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
13 | #define PROT_NONE 0x0 /* page can not be accessed */ | ||
14 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | ||
15 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | ||
16 | |||
17 | #define MAP_SHARED 0x01 /* Share changes */ | ||
18 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
19 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | ||
20 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | ||
21 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | ||
22 | #ifdef CONFIG_MMAP_ALLOW_UNINITIALIZED | ||
23 | # define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be uninitialized */ | ||
24 | #else | ||
25 | # define MAP_UNINITIALIZED 0x0 /* Don't support this flag */ | ||
26 | #endif | ||
27 | |||
28 | #define MS_ASYNC 1 /* sync memory asynchronously */ | ||
29 | #define MS_INVALIDATE 2 /* invalidate the caches */ | ||
30 | #define MS_SYNC 4 /* synchronous memory sync */ | ||
31 | |||
32 | #define MADV_NORMAL 0 /* no further special treatment */ | ||
33 | #define MADV_RANDOM 1 /* expect random page references */ | ||
34 | #define MADV_SEQUENTIAL 2 /* expect sequential page references */ | ||
35 | #define MADV_WILLNEED 3 /* will need these pages */ | ||
36 | #define MADV_DONTNEED 4 /* don't need these pages */ | ||
37 | |||
38 | /* common parameters: try to keep these consistent across architectures */ | ||
39 | #define MADV_REMOVE 9 /* remove these pages & resources */ | ||
40 | #define MADV_DONTFORK 10 /* don't inherit across fork */ | ||
41 | #define MADV_DOFORK 11 /* do inherit across fork */ | ||
42 | #define MADV_HWPOISON 100 /* poison a page for testing */ | ||
43 | #define MADV_SOFT_OFFLINE 101 /* soft offline page for testing */ | ||
44 | |||
45 | #define MADV_MERGEABLE 12 /* KSM may merge identical pages */ | ||
46 | #define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */ | ||
47 | |||
48 | #define MADV_HUGEPAGE 14 /* Worth backing with hugepages */ | ||
49 | #define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages */ | ||
50 | |||
51 | #define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, | ||
52 | overrides the coredump filter bits */ | ||
53 | #define MADV_DODUMP 17 /* Clear the MADV_NODUMP flag */ | ||
54 | |||
55 | /* compatibility flags */ | ||
56 | #define MAP_FILE 0 | ||
57 | |||
58 | #endif /* __ASM_GENERIC_MMAN_COMMON_H */ | ||
diff --git a/include/uapi/asm-generic/mman.h b/include/uapi/asm-generic/mman.h new file mode 100644 index 000000000000..32c8bd6a196d --- /dev/null +++ b/include/uapi/asm-generic/mman.h | |||
@@ -0,0 +1,19 @@ | |||
1 | #ifndef __ASM_GENERIC_MMAN_H | ||
2 | #define __ASM_GENERIC_MMAN_H | ||
3 | |||
4 | #include <asm-generic/mman-common.h> | ||
5 | |||
6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | ||
7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | ||
8 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | ||
9 | #define MAP_LOCKED 0x2000 /* pages are locked */ | ||
10 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ | ||
11 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | ||
12 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | ||
13 | #define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ | ||
14 | #define MAP_HUGETLB 0x40000 /* create a huge page mapping */ | ||
15 | |||
16 | #define MCL_CURRENT 1 /* lock all current mappings */ | ||
17 | #define MCL_FUTURE 2 /* lock all future mappings */ | ||
18 | |||
19 | #endif /* __ASM_GENERIC_MMAN_H */ | ||
diff --git a/include/uapi/asm-generic/msgbuf.h b/include/uapi/asm-generic/msgbuf.h new file mode 100644 index 000000000000..aec850d9159e --- /dev/null +++ b/include/uapi/asm-generic/msgbuf.h | |||
@@ -0,0 +1,47 @@ | |||
1 | #ifndef __ASM_GENERIC_MSGBUF_H | ||
2 | #define __ASM_GENERIC_MSGBUF_H | ||
3 | |||
4 | #include <asm/bitsperlong.h> | ||
5 | /* | ||
6 | * generic msqid64_ds structure. | ||
7 | * | ||
8 | * Note extra padding because this structure is passed back and forth | ||
9 | * between kernel and user space. | ||
10 | * | ||
11 | * msqid64_ds was originally meant to be architecture specific, but | ||
12 | * everyone just ended up making identical copies without specific | ||
13 | * optimizations, so we may just as well all use the same one. | ||
14 | * | ||
15 | * 64 bit architectures typically define a 64 bit __kernel_time_t, | ||
16 | * so they do not need the first three padding words. | ||
17 | * On big-endian systems, the padding is in the wrong place. | ||
18 | * | ||
19 | * Pad space is left for: | ||
20 | * - 64-bit time_t to solve y2038 problem | ||
21 | * - 2 miscellaneous 32-bit values | ||
22 | */ | ||
23 | |||
24 | struct msqid64_ds { | ||
25 | struct ipc64_perm msg_perm; | ||
26 | __kernel_time_t msg_stime; /* last msgsnd time */ | ||
27 | #if __BITS_PER_LONG != 64 | ||
28 | unsigned long __unused1; | ||
29 | #endif | ||
30 | __kernel_time_t msg_rtime; /* last msgrcv time */ | ||
31 | #if __BITS_PER_LONG != 64 | ||
32 | unsigned long __unused2; | ||
33 | #endif | ||
34 | __kernel_time_t msg_ctime; /* last change time */ | ||
35 | #if __BITS_PER_LONG != 64 | ||
36 | unsigned long __unused3; | ||
37 | #endif | ||
38 | unsigned long msg_cbytes; /* current number of bytes on queue */ | ||
39 | unsigned long msg_qnum; /* number of messages in queue */ | ||
40 | unsigned long msg_qbytes; /* max number of bytes on queue */ | ||
41 | __kernel_pid_t msg_lspid; /* pid of last msgsnd */ | ||
42 | __kernel_pid_t msg_lrpid; /* last receive pid */ | ||
43 | unsigned long __unused4; | ||
44 | unsigned long __unused5; | ||
45 | }; | ||
46 | |||
47 | #endif /* __ASM_GENERIC_MSGBUF_H */ | ||
diff --git a/include/uapi/asm-generic/param.h b/include/uapi/asm-generic/param.h new file mode 100644 index 000000000000..5becc84396b8 --- /dev/null +++ b/include/uapi/asm-generic/param.h | |||
@@ -0,0 +1,19 @@ | |||
1 | #ifndef _UAPI__ASM_GENERIC_PARAM_H | ||
2 | #define _UAPI__ASM_GENERIC_PARAM_H | ||
3 | |||
4 | #ifndef HZ | ||
5 | #define HZ 100 | ||
6 | #endif | ||
7 | |||
8 | #ifndef EXEC_PAGESIZE | ||
9 | #define EXEC_PAGESIZE 4096 | ||
10 | #endif | ||
11 | |||
12 | #ifndef NOGROUP | ||
13 | #define NOGROUP (-1) | ||
14 | #endif | ||
15 | |||
16 | #define MAXHOSTNAMELEN 64 /* max length of hostname */ | ||
17 | |||
18 | |||
19 | #endif /* _UAPI__ASM_GENERIC_PARAM_H */ | ||
diff --git a/include/uapi/asm-generic/poll.h b/include/uapi/asm-generic/poll.h new file mode 100644 index 000000000000..9ce7f44aebd2 --- /dev/null +++ b/include/uapi/asm-generic/poll.h | |||
@@ -0,0 +1,39 @@ | |||
1 | #ifndef __ASM_GENERIC_POLL_H | ||
2 | #define __ASM_GENERIC_POLL_H | ||
3 | |||
4 | /* These are specified by iBCS2 */ | ||
5 | #define POLLIN 0x0001 | ||
6 | #define POLLPRI 0x0002 | ||
7 | #define POLLOUT 0x0004 | ||
8 | #define POLLERR 0x0008 | ||
9 | #define POLLHUP 0x0010 | ||
10 | #define POLLNVAL 0x0020 | ||
11 | |||
12 | /* The rest seem to be more-or-less nonstandard. Check them! */ | ||
13 | #define POLLRDNORM 0x0040 | ||
14 | #define POLLRDBAND 0x0080 | ||
15 | #ifndef POLLWRNORM | ||
16 | #define POLLWRNORM 0x0100 | ||
17 | #endif | ||
18 | #ifndef POLLWRBAND | ||
19 | #define POLLWRBAND 0x0200 | ||
20 | #endif | ||
21 | #ifndef POLLMSG | ||
22 | #define POLLMSG 0x0400 | ||
23 | #endif | ||
24 | #ifndef POLLREMOVE | ||
25 | #define POLLREMOVE 0x1000 | ||
26 | #endif | ||
27 | #ifndef POLLRDHUP | ||
28 | #define POLLRDHUP 0x2000 | ||
29 | #endif | ||
30 | |||
31 | #define POLLFREE 0x4000 /* currently only for epoll */ | ||
32 | |||
33 | struct pollfd { | ||
34 | int fd; | ||
35 | short events; | ||
36 | short revents; | ||
37 | }; | ||
38 | |||
39 | #endif /* __ASM_GENERIC_POLL_H */ | ||
diff --git a/include/uapi/asm-generic/posix_types.h b/include/uapi/asm-generic/posix_types.h new file mode 100644 index 000000000000..fe74fccf18db --- /dev/null +++ b/include/uapi/asm-generic/posix_types.h | |||
@@ -0,0 +1,96 @@ | |||
1 | #ifndef __ASM_GENERIC_POSIX_TYPES_H | ||
2 | #define __ASM_GENERIC_POSIX_TYPES_H | ||
3 | |||
4 | #include <asm/bitsperlong.h> | ||
5 | /* | ||
6 | * This file is generally used by user-level software, so you need to | ||
7 | * be a little careful about namespace pollution etc. | ||
8 | * | ||
9 | * First the types that are often defined in different ways across | ||
10 | * architectures, so that you can override them. | ||
11 | */ | ||
12 | |||
13 | #ifndef __kernel_long_t | ||
14 | typedef long __kernel_long_t; | ||
15 | typedef unsigned long __kernel_ulong_t; | ||
16 | #endif | ||
17 | |||
18 | #ifndef __kernel_ino_t | ||
19 | typedef __kernel_ulong_t __kernel_ino_t; | ||
20 | #endif | ||
21 | |||
22 | #ifndef __kernel_mode_t | ||
23 | typedef unsigned int __kernel_mode_t; | ||
24 | #endif | ||
25 | |||
26 | #ifndef __kernel_pid_t | ||
27 | typedef int __kernel_pid_t; | ||
28 | #endif | ||
29 | |||
30 | #ifndef __kernel_ipc_pid_t | ||
31 | typedef int __kernel_ipc_pid_t; | ||
32 | #endif | ||
33 | |||
34 | #ifndef __kernel_uid_t | ||
35 | typedef unsigned int __kernel_uid_t; | ||
36 | typedef unsigned int __kernel_gid_t; | ||
37 | #endif | ||
38 | |||
39 | #ifndef __kernel_suseconds_t | ||
40 | typedef __kernel_long_t __kernel_suseconds_t; | ||
41 | #endif | ||
42 | |||
43 | #ifndef __kernel_daddr_t | ||
44 | typedef int __kernel_daddr_t; | ||
45 | #endif | ||
46 | |||
47 | #ifndef __kernel_uid32_t | ||
48 | typedef unsigned int __kernel_uid32_t; | ||
49 | typedef unsigned int __kernel_gid32_t; | ||
50 | #endif | ||
51 | |||
52 | #ifndef __kernel_old_uid_t | ||
53 | typedef __kernel_uid_t __kernel_old_uid_t; | ||
54 | typedef __kernel_gid_t __kernel_old_gid_t; | ||
55 | #endif | ||
56 | |||
57 | #ifndef __kernel_old_dev_t | ||
58 | typedef unsigned int __kernel_old_dev_t; | ||
59 | #endif | ||
60 | |||
61 | /* | ||
62 | * Most 32 bit architectures use "unsigned int" size_t, | ||
63 | * and all 64 bit architectures use "unsigned long" size_t. | ||
64 | */ | ||
65 | #ifndef __kernel_size_t | ||
66 | #if __BITS_PER_LONG != 64 | ||
67 | typedef unsigned int __kernel_size_t; | ||
68 | typedef int __kernel_ssize_t; | ||
69 | typedef int __kernel_ptrdiff_t; | ||
70 | #else | ||
71 | typedef __kernel_ulong_t __kernel_size_t; | ||
72 | typedef __kernel_long_t __kernel_ssize_t; | ||
73 | typedef __kernel_long_t __kernel_ptrdiff_t; | ||
74 | #endif | ||
75 | #endif | ||
76 | |||
77 | #ifndef __kernel_fsid_t | ||
78 | typedef struct { | ||
79 | int val[2]; | ||
80 | } __kernel_fsid_t; | ||
81 | #endif | ||
82 | |||
83 | /* | ||
84 | * anything below here should be completely generic | ||
85 | */ | ||
86 | typedef __kernel_long_t __kernel_off_t; | ||
87 | typedef long long __kernel_loff_t; | ||
88 | typedef __kernel_long_t __kernel_time_t; | ||
89 | typedef __kernel_long_t __kernel_clock_t; | ||
90 | typedef int __kernel_timer_t; | ||
91 | typedef int __kernel_clockid_t; | ||
92 | typedef char * __kernel_caddr_t; | ||
93 | typedef unsigned short __kernel_uid16_t; | ||
94 | typedef unsigned short __kernel_gid16_t; | ||
95 | |||
96 | #endif /* __ASM_GENERIC_POSIX_TYPES_H */ | ||
diff --git a/include/uapi/asm-generic/resource.h b/include/uapi/asm-generic/resource.h new file mode 100644 index 000000000000..f863428796d5 --- /dev/null +++ b/include/uapi/asm-generic/resource.h | |||
@@ -0,0 +1,68 @@ | |||
1 | #ifndef _UAPI_ASM_GENERIC_RESOURCE_H | ||
2 | #define _UAPI_ASM_GENERIC_RESOURCE_H | ||
3 | |||
4 | /* | ||
5 | * Resource limit IDs | ||
6 | * | ||
7 | * ( Compatibility detail: there are architectures that have | ||
8 | * a different rlimit ID order in the 5-9 range and want | ||
9 | * to keep that order for binary compatibility. The reasons | ||
10 | * are historic and all new rlimits are identical across all | ||
11 | * arches. If an arch has such special order for some rlimits | ||
12 | * then it defines them prior including asm-generic/resource.h. ) | ||
13 | */ | ||
14 | |||
15 | #define RLIMIT_CPU 0 /* CPU time in sec */ | ||
16 | #define RLIMIT_FSIZE 1 /* Maximum filesize */ | ||
17 | #define RLIMIT_DATA 2 /* max data size */ | ||
18 | #define RLIMIT_STACK 3 /* max stack size */ | ||
19 | #define RLIMIT_CORE 4 /* max core file size */ | ||
20 | |||
21 | #ifndef RLIMIT_RSS | ||
22 | # define RLIMIT_RSS 5 /* max resident set size */ | ||
23 | #endif | ||
24 | |||
25 | #ifndef RLIMIT_NPROC | ||
26 | # define RLIMIT_NPROC 6 /* max number of processes */ | ||
27 | #endif | ||
28 | |||
29 | #ifndef RLIMIT_NOFILE | ||
30 | # define RLIMIT_NOFILE 7 /* max number of open files */ | ||
31 | #endif | ||
32 | |||
33 | #ifndef RLIMIT_MEMLOCK | ||
34 | # define RLIMIT_MEMLOCK 8 /* max locked-in-memory address space */ | ||
35 | #endif | ||
36 | |||
37 | #ifndef RLIMIT_AS | ||
38 | # define RLIMIT_AS 9 /* address space limit */ | ||
39 | #endif | ||
40 | |||
41 | #define RLIMIT_LOCKS 10 /* maximum file locks held */ | ||
42 | #define RLIMIT_SIGPENDING 11 /* max number of pending signals */ | ||
43 | #define RLIMIT_MSGQUEUE 12 /* maximum bytes in POSIX mqueues */ | ||
44 | #define RLIMIT_NICE 13 /* max nice prio allowed to raise to | ||
45 | 0-39 for nice level 19 .. -20 */ | ||
46 | #define RLIMIT_RTPRIO 14 /* maximum realtime priority */ | ||
47 | #define RLIMIT_RTTIME 15 /* timeout for RT tasks in us */ | ||
48 | #define RLIM_NLIMITS 16 | ||
49 | |||
50 | /* | ||
51 | * SuS says limits have to be unsigned. | ||
52 | * Which makes a ton more sense anyway. | ||
53 | * | ||
54 | * Some architectures override this (for compatibility reasons): | ||
55 | */ | ||
56 | #ifndef RLIM_INFINITY | ||
57 | # define RLIM_INFINITY (~0UL) | ||
58 | #endif | ||
59 | |||
60 | /* | ||
61 | * RLIMIT_STACK default maximum - some architectures override it: | ||
62 | */ | ||
63 | #ifndef _STK_LIM_MAX | ||
64 | # define _STK_LIM_MAX RLIM_INFINITY | ||
65 | #endif | ||
66 | |||
67 | |||
68 | #endif /* _UAPI_ASM_GENERIC_RESOURCE_H */ | ||
diff --git a/include/uapi/asm-generic/sembuf.h b/include/uapi/asm-generic/sembuf.h new file mode 100644 index 000000000000..4cb2c13e5090 --- /dev/null +++ b/include/uapi/asm-generic/sembuf.h | |||
@@ -0,0 +1,38 @@ | |||
1 | #ifndef __ASM_GENERIC_SEMBUF_H | ||
2 | #define __ASM_GENERIC_SEMBUF_H | ||
3 | |||
4 | #include <asm/bitsperlong.h> | ||
5 | |||
6 | /* | ||
7 | * The semid64_ds structure for x86 architecture. | ||
8 | * Note extra padding because this structure is passed back and forth | ||
9 | * between kernel and user space. | ||
10 | * | ||
11 | * semid64_ds was originally meant to be architecture specific, but | ||
12 | * everyone just ended up making identical copies without specific | ||
13 | * optimizations, so we may just as well all use the same one. | ||
14 | * | ||
15 | * 64 bit architectures typically define a 64 bit __kernel_time_t, | ||
16 | * so they do not need the first two padding words. | ||
17 | * On big-endian systems, the padding is in the wrong place. | ||
18 | * | ||
19 | * Pad space is left for: | ||
20 | * - 64-bit time_t to solve y2038 problem | ||
21 | * - 2 miscellaneous 32-bit values | ||
22 | */ | ||
23 | struct semid64_ds { | ||
24 | struct ipc64_perm sem_perm; /* permissions .. see ipc.h */ | ||
25 | __kernel_time_t sem_otime; /* last semop time */ | ||
26 | #if __BITS_PER_LONG != 64 | ||
27 | unsigned long __unused1; | ||
28 | #endif | ||
29 | __kernel_time_t sem_ctime; /* last change time */ | ||
30 | #if __BITS_PER_LONG != 64 | ||
31 | unsigned long __unused2; | ||
32 | #endif | ||
33 | unsigned long sem_nsems; /* no. of semaphores in array */ | ||
34 | unsigned long __unused3; | ||
35 | unsigned long __unused4; | ||
36 | }; | ||
37 | |||
38 | #endif /* __ASM_GENERIC_SEMBUF_H */ | ||
diff --git a/include/uapi/asm-generic/setup.h b/include/uapi/asm-generic/setup.h new file mode 100644 index 000000000000..6fc26a51003c --- /dev/null +++ b/include/uapi/asm-generic/setup.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __ASM_GENERIC_SETUP_H | ||
2 | #define __ASM_GENERIC_SETUP_H | ||
3 | |||
4 | #define COMMAND_LINE_SIZE 512 | ||
5 | |||
6 | #endif /* __ASM_GENERIC_SETUP_H */ | ||
diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h new file mode 100644 index 000000000000..5768fa60ac82 --- /dev/null +++ b/include/uapi/asm-generic/shmbuf.h | |||
@@ -0,0 +1,59 @@ | |||
1 | #ifndef __ASM_GENERIC_SHMBUF_H | ||
2 | #define __ASM_GENERIC_SHMBUF_H | ||
3 | |||
4 | #include <asm/bitsperlong.h> | ||
5 | |||
6 | /* | ||
7 | * The shmid64_ds structure for x86 architecture. | ||
8 | * Note extra padding because this structure is passed back and forth | ||
9 | * between kernel and user space. | ||
10 | * | ||
11 | * shmid64_ds was originally meant to be architecture specific, but | ||
12 | * everyone just ended up making identical copies without specific | ||
13 | * optimizations, so we may just as well all use the same one. | ||
14 | * | ||
15 | * 64 bit architectures typically define a 64 bit __kernel_time_t, | ||
16 | * so they do not need the first two padding words. | ||
17 | * On big-endian systems, the padding is in the wrong place. | ||
18 | * | ||
19 | * | ||
20 | * Pad space is left for: | ||
21 | * - 64-bit time_t to solve y2038 problem | ||
22 | * - 2 miscellaneous 32-bit values | ||
23 | */ | ||
24 | |||
25 | struct shmid64_ds { | ||
26 | struct ipc64_perm shm_perm; /* operation perms */ | ||
27 | size_t shm_segsz; /* size of segment (bytes) */ | ||
28 | __kernel_time_t shm_atime; /* last attach time */ | ||
29 | #if __BITS_PER_LONG != 64 | ||
30 | unsigned long __unused1; | ||
31 | #endif | ||
32 | __kernel_time_t shm_dtime; /* last detach time */ | ||
33 | #if __BITS_PER_LONG != 64 | ||
34 | unsigned long __unused2; | ||
35 | #endif | ||
36 | __kernel_time_t shm_ctime; /* last change time */ | ||
37 | #if __BITS_PER_LONG != 64 | ||
38 | unsigned long __unused3; | ||
39 | #endif | ||
40 | __kernel_pid_t shm_cpid; /* pid of creator */ | ||
41 | __kernel_pid_t shm_lpid; /* pid of last operator */ | ||
42 | unsigned long shm_nattch; /* no. of current attaches */ | ||
43 | unsigned long __unused4; | ||
44 | unsigned long __unused5; | ||
45 | }; | ||
46 | |||
47 | struct shminfo64 { | ||
48 | unsigned long shmmax; | ||
49 | unsigned long shmmin; | ||
50 | unsigned long shmmni; | ||
51 | unsigned long shmseg; | ||
52 | unsigned long shmall; | ||
53 | unsigned long __unused1; | ||
54 | unsigned long __unused2; | ||
55 | unsigned long __unused3; | ||
56 | unsigned long __unused4; | ||
57 | }; | ||
58 | |||
59 | #endif /* __ASM_GENERIC_SHMBUF_H */ | ||
diff --git a/include/uapi/asm-generic/shmparam.h b/include/uapi/asm-generic/shmparam.h new file mode 100644 index 000000000000..51a3852de733 --- /dev/null +++ b/include/uapi/asm-generic/shmparam.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __ASM_GENERIC_SHMPARAM_H | ||
2 | #define __ASM_GENERIC_SHMPARAM_H | ||
3 | |||
4 | #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ | ||
5 | |||
6 | #endif /* _ASM_GENERIC_SHMPARAM_H */ | ||
diff --git a/include/uapi/asm-generic/siginfo.h b/include/uapi/asm-generic/siginfo.h new file mode 100644 index 000000000000..ba5be7fdbdfe --- /dev/null +++ b/include/uapi/asm-generic/siginfo.h | |||
@@ -0,0 +1,298 @@ | |||
1 | #ifndef _UAPI_ASM_GENERIC_SIGINFO_H | ||
2 | #define _UAPI_ASM_GENERIC_SIGINFO_H | ||
3 | |||
4 | #include <linux/compiler.h> | ||
5 | #include <linux/types.h> | ||
6 | |||
7 | typedef union sigval { | ||
8 | int sival_int; | ||
9 | void __user *sival_ptr; | ||
10 | } sigval_t; | ||
11 | |||
12 | /* | ||
13 | * This is the size (including padding) of the part of the | ||
14 | * struct siginfo that is before the union. | ||
15 | */ | ||
16 | #ifndef __ARCH_SI_PREAMBLE_SIZE | ||
17 | #define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) | ||
18 | #endif | ||
19 | |||
20 | #define SI_MAX_SIZE 128 | ||
21 | #ifndef SI_PAD_SIZE | ||
22 | #define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int)) | ||
23 | #endif | ||
24 | |||
25 | #ifndef __ARCH_SI_UID_T | ||
26 | #define __ARCH_SI_UID_T __kernel_uid32_t | ||
27 | #endif | ||
28 | |||
29 | /* | ||
30 | * The default "si_band" type is "long", as specified by POSIX. | ||
31 | * However, some architectures want to override this to "int" | ||
32 | * for historical compatibility reasons, so we allow that. | ||
33 | */ | ||
34 | #ifndef __ARCH_SI_BAND_T | ||
35 | #define __ARCH_SI_BAND_T long | ||
36 | #endif | ||
37 | |||
38 | #ifndef __ARCH_SI_CLOCK_T | ||
39 | #define __ARCH_SI_CLOCK_T __kernel_clock_t | ||
40 | #endif | ||
41 | |||
42 | #ifndef __ARCH_SI_ATTRIBUTES | ||
43 | #define __ARCH_SI_ATTRIBUTES | ||
44 | #endif | ||
45 | |||
46 | #ifndef HAVE_ARCH_SIGINFO_T | ||
47 | |||
48 | typedef struct siginfo { | ||
49 | int si_signo; | ||
50 | int si_errno; | ||
51 | int si_code; | ||
52 | |||
53 | union { | ||
54 | int _pad[SI_PAD_SIZE]; | ||
55 | |||
56 | /* kill() */ | ||
57 | struct { | ||
58 | __kernel_pid_t _pid; /* sender's pid */ | ||
59 | __ARCH_SI_UID_T _uid; /* sender's uid */ | ||
60 | } _kill; | ||
61 | |||
62 | /* POSIX.1b timers */ | ||
63 | struct { | ||
64 | __kernel_timer_t _tid; /* timer id */ | ||
65 | int _overrun; /* overrun count */ | ||
66 | char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)]; | ||
67 | sigval_t _sigval; /* same as below */ | ||
68 | int _sys_private; /* not to be passed to user */ | ||
69 | } _timer; | ||
70 | |||
71 | /* POSIX.1b signals */ | ||
72 | struct { | ||
73 | __kernel_pid_t _pid; /* sender's pid */ | ||
74 | __ARCH_SI_UID_T _uid; /* sender's uid */ | ||
75 | sigval_t _sigval; | ||
76 | } _rt; | ||
77 | |||
78 | /* SIGCHLD */ | ||
79 | struct { | ||
80 | __kernel_pid_t _pid; /* which child */ | ||
81 | __ARCH_SI_UID_T _uid; /* sender's uid */ | ||
82 | int _status; /* exit code */ | ||
83 | __ARCH_SI_CLOCK_T _utime; | ||
84 | __ARCH_SI_CLOCK_T _stime; | ||
85 | } _sigchld; | ||
86 | |||
87 | /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ | ||
88 | struct { | ||
89 | void __user *_addr; /* faulting insn/memory ref. */ | ||
90 | #ifdef __ARCH_SI_TRAPNO | ||
91 | int _trapno; /* TRAP # which caused the signal */ | ||
92 | #endif | ||
93 | short _addr_lsb; /* LSB of the reported address */ | ||
94 | } _sigfault; | ||
95 | |||
96 | /* SIGPOLL */ | ||
97 | struct { | ||
98 | __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */ | ||
99 | int _fd; | ||
100 | } _sigpoll; | ||
101 | |||
102 | /* SIGSYS */ | ||
103 | struct { | ||
104 | void __user *_call_addr; /* calling user insn */ | ||
105 | int _syscall; /* triggering system call number */ | ||
106 | unsigned int _arch; /* AUDIT_ARCH_* of syscall */ | ||
107 | } _sigsys; | ||
108 | } _sifields; | ||
109 | } __ARCH_SI_ATTRIBUTES siginfo_t; | ||
110 | |||
111 | /* If the arch shares siginfo, then it has SIGSYS. */ | ||
112 | #define __ARCH_SIGSYS | ||
113 | #endif | ||
114 | |||
115 | /* | ||
116 | * How these fields are to be accessed. | ||
117 | */ | ||
118 | #define si_pid _sifields._kill._pid | ||
119 | #define si_uid _sifields._kill._uid | ||
120 | #define si_tid _sifields._timer._tid | ||
121 | #define si_overrun _sifields._timer._overrun | ||
122 | #define si_sys_private _sifields._timer._sys_private | ||
123 | #define si_status _sifields._sigchld._status | ||
124 | #define si_utime _sifields._sigchld._utime | ||
125 | #define si_stime _sifields._sigchld._stime | ||
126 | #define si_value _sifields._rt._sigval | ||
127 | #define si_int _sifields._rt._sigval.sival_int | ||
128 | #define si_ptr _sifields._rt._sigval.sival_ptr | ||
129 | #define si_addr _sifields._sigfault._addr | ||
130 | #ifdef __ARCH_SI_TRAPNO | ||
131 | #define si_trapno _sifields._sigfault._trapno | ||
132 | #endif | ||
133 | #define si_addr_lsb _sifields._sigfault._addr_lsb | ||
134 | #define si_band _sifields._sigpoll._band | ||
135 | #define si_fd _sifields._sigpoll._fd | ||
136 | #ifdef __ARCH_SIGSYS | ||
137 | #define si_call_addr _sifields._sigsys._call_addr | ||
138 | #define si_syscall _sifields._sigsys._syscall | ||
139 | #define si_arch _sifields._sigsys._arch | ||
140 | #endif | ||
141 | |||
142 | #ifndef __KERNEL__ | ||
143 | #define __SI_KILL 0 | ||
144 | #define __SI_TIMER 0 | ||
145 | #define __SI_POLL 0 | ||
146 | #define __SI_FAULT 0 | ||
147 | #define __SI_CHLD 0 | ||
148 | #define __SI_RT 0 | ||
149 | #define __SI_MESGQ 0 | ||
150 | #define __SI_SYS 0 | ||
151 | #define __SI_CODE(T,N) (N) | ||
152 | #endif | ||
153 | |||
154 | /* | ||
155 | * si_code values | ||
156 | * Digital reserves positive values for kernel-generated signals. | ||
157 | */ | ||
158 | #define SI_USER 0 /* sent by kill, sigsend, raise */ | ||
159 | #define SI_KERNEL 0x80 /* sent by the kernel from somewhere */ | ||
160 | #define SI_QUEUE -1 /* sent by sigqueue */ | ||
161 | #define SI_TIMER __SI_CODE(__SI_TIMER,-2) /* sent by timer expiration */ | ||
162 | #define SI_MESGQ __SI_CODE(__SI_MESGQ,-3) /* sent by real time mesq state change */ | ||
163 | #define SI_ASYNCIO -4 /* sent by AIO completion */ | ||
164 | #define SI_SIGIO -5 /* sent by queued SIGIO */ | ||
165 | #define SI_TKILL -6 /* sent by tkill system call */ | ||
166 | #define SI_DETHREAD -7 /* sent by execve() killing subsidiary threads */ | ||
167 | |||
168 | #define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) | ||
169 | #define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) | ||
170 | |||
171 | /* | ||
172 | * SIGILL si_codes | ||
173 | */ | ||
174 | #define ILL_ILLOPC (__SI_FAULT|1) /* illegal opcode */ | ||
175 | #define ILL_ILLOPN (__SI_FAULT|2) /* illegal operand */ | ||
176 | #define ILL_ILLADR (__SI_FAULT|3) /* illegal addressing mode */ | ||
177 | #define ILL_ILLTRP (__SI_FAULT|4) /* illegal trap */ | ||
178 | #define ILL_PRVOPC (__SI_FAULT|5) /* privileged opcode */ | ||
179 | #define ILL_PRVREG (__SI_FAULT|6) /* privileged register */ | ||
180 | #define ILL_COPROC (__SI_FAULT|7) /* coprocessor error */ | ||
181 | #define ILL_BADSTK (__SI_FAULT|8) /* internal stack error */ | ||
182 | #define NSIGILL 8 | ||
183 | |||
184 | /* | ||
185 | * SIGFPE si_codes | ||
186 | */ | ||
187 | #define FPE_INTDIV (__SI_FAULT|1) /* integer divide by zero */ | ||
188 | #define FPE_INTOVF (__SI_FAULT|2) /* integer overflow */ | ||
189 | #define FPE_FLTDIV (__SI_FAULT|3) /* floating point divide by zero */ | ||
190 | #define FPE_FLTOVF (__SI_FAULT|4) /* floating point overflow */ | ||
191 | #define FPE_FLTUND (__SI_FAULT|5) /* floating point underflow */ | ||
192 | #define FPE_FLTRES (__SI_FAULT|6) /* floating point inexact result */ | ||
193 | #define FPE_FLTINV (__SI_FAULT|7) /* floating point invalid operation */ | ||
194 | #define FPE_FLTSUB (__SI_FAULT|8) /* subscript out of range */ | ||
195 | #define NSIGFPE 8 | ||
196 | |||
197 | /* | ||
198 | * SIGSEGV si_codes | ||
199 | */ | ||
200 | #define SEGV_MAPERR (__SI_FAULT|1) /* address not mapped to object */ | ||
201 | #define SEGV_ACCERR (__SI_FAULT|2) /* invalid permissions for mapped object */ | ||
202 | #define NSIGSEGV 2 | ||
203 | |||
204 | /* | ||
205 | * SIGBUS si_codes | ||
206 | */ | ||
207 | #define BUS_ADRALN (__SI_FAULT|1) /* invalid address alignment */ | ||
208 | #define BUS_ADRERR (__SI_FAULT|2) /* non-existent physical address */ | ||
209 | #define BUS_OBJERR (__SI_FAULT|3) /* object specific hardware error */ | ||
210 | /* hardware memory error consumed on a machine check: action required */ | ||
211 | #define BUS_MCEERR_AR (__SI_FAULT|4) | ||
212 | /* hardware memory error detected in process but not consumed: action optional*/ | ||
213 | #define BUS_MCEERR_AO (__SI_FAULT|5) | ||
214 | #define NSIGBUS 5 | ||
215 | |||
216 | /* | ||
217 | * SIGTRAP si_codes | ||
218 | */ | ||
219 | #define TRAP_BRKPT (__SI_FAULT|1) /* process breakpoint */ | ||
220 | #define TRAP_TRACE (__SI_FAULT|2) /* process trace trap */ | ||
221 | #define TRAP_BRANCH (__SI_FAULT|3) /* process taken branch trap */ | ||
222 | #define TRAP_HWBKPT (__SI_FAULT|4) /* hardware breakpoint/watchpoint */ | ||
223 | #define NSIGTRAP 4 | ||
224 | |||
225 | /* | ||
226 | * SIGCHLD si_codes | ||
227 | */ | ||
228 | #define CLD_EXITED (__SI_CHLD|1) /* child has exited */ | ||
229 | #define CLD_KILLED (__SI_CHLD|2) /* child was killed */ | ||
230 | #define CLD_DUMPED (__SI_CHLD|3) /* child terminated abnormally */ | ||
231 | #define CLD_TRAPPED (__SI_CHLD|4) /* traced child has trapped */ | ||
232 | #define CLD_STOPPED (__SI_CHLD|5) /* child has stopped */ | ||
233 | #define CLD_CONTINUED (__SI_CHLD|6) /* stopped child has continued */ | ||
234 | #define NSIGCHLD 6 | ||
235 | |||
236 | /* | ||
237 | * SIGPOLL si_codes | ||
238 | */ | ||
239 | #define POLL_IN (__SI_POLL|1) /* data input available */ | ||
240 | #define POLL_OUT (__SI_POLL|2) /* output buffers available */ | ||
241 | #define POLL_MSG (__SI_POLL|3) /* input message available */ | ||
242 | #define POLL_ERR (__SI_POLL|4) /* i/o error */ | ||
243 | #define POLL_PRI (__SI_POLL|5) /* high priority input available */ | ||
244 | #define POLL_HUP (__SI_POLL|6) /* device disconnected */ | ||
245 | #define NSIGPOLL 6 | ||
246 | |||
247 | /* | ||
248 | * SIGSYS si_codes | ||
249 | */ | ||
250 | #define SYS_SECCOMP (__SI_SYS|1) /* seccomp triggered */ | ||
251 | #define NSIGSYS 1 | ||
252 | |||
253 | /* | ||
254 | * sigevent definitions | ||
255 | * | ||
256 | * It seems likely that SIGEV_THREAD will have to be handled from | ||
257 | * userspace, libpthread transmuting it to SIGEV_SIGNAL, which the | ||
258 | * thread manager then catches and does the appropriate nonsense. | ||
259 | * However, everything is written out here so as to not get lost. | ||
260 | */ | ||
261 | #define SIGEV_SIGNAL 0 /* notify via signal */ | ||
262 | #define SIGEV_NONE 1 /* other notification: meaningless */ | ||
263 | #define SIGEV_THREAD 2 /* deliver via thread creation */ | ||
264 | #define SIGEV_THREAD_ID 4 /* deliver to thread */ | ||
265 | |||
266 | /* | ||
267 | * This works because the alignment is ok on all current architectures | ||
268 | * but we leave open this being overridden in the future | ||
269 | */ | ||
270 | #ifndef __ARCH_SIGEV_PREAMBLE_SIZE | ||
271 | #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t)) | ||
272 | #endif | ||
273 | |||
274 | #define SIGEV_MAX_SIZE 64 | ||
275 | #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) \ | ||
276 | / sizeof(int)) | ||
277 | |||
278 | typedef struct sigevent { | ||
279 | sigval_t sigev_value; | ||
280 | int sigev_signo; | ||
281 | int sigev_notify; | ||
282 | union { | ||
283 | int _pad[SIGEV_PAD_SIZE]; | ||
284 | int _tid; | ||
285 | |||
286 | struct { | ||
287 | void (*_function)(sigval_t); | ||
288 | void *_attribute; /* really pthread_attr_t */ | ||
289 | } _sigev_thread; | ||
290 | } _sigev_un; | ||
291 | } sigevent_t; | ||
292 | |||
293 | #define sigev_notify_function _sigev_un._sigev_thread._function | ||
294 | #define sigev_notify_attributes _sigev_un._sigev_thread._attribute | ||
295 | #define sigev_notify_thread_id _sigev_un._tid | ||
296 | |||
297 | |||
298 | #endif /* _UAPI_ASM_GENERIC_SIGINFO_H */ | ||
diff --git a/include/uapi/asm-generic/signal-defs.h b/include/uapi/asm-generic/signal-defs.h new file mode 100644 index 000000000000..00f95df54297 --- /dev/null +++ b/include/uapi/asm-generic/signal-defs.h | |||
@@ -0,0 +1,28 @@ | |||
1 | #ifndef __ASM_GENERIC_SIGNAL_DEFS_H | ||
2 | #define __ASM_GENERIC_SIGNAL_DEFS_H | ||
3 | |||
4 | #include <linux/compiler.h> | ||
5 | |||
6 | #ifndef SIG_BLOCK | ||
7 | #define SIG_BLOCK 0 /* for blocking signals */ | ||
8 | #endif | ||
9 | #ifndef SIG_UNBLOCK | ||
10 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
11 | #endif | ||
12 | #ifndef SIG_SETMASK | ||
13 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
14 | #endif | ||
15 | |||
16 | #ifndef __ASSEMBLY__ | ||
17 | typedef void __signalfn_t(int); | ||
18 | typedef __signalfn_t __user *__sighandler_t; | ||
19 | |||
20 | typedef void __restorefn_t(void); | ||
21 | typedef __restorefn_t __user *__sigrestore_t; | ||
22 | |||
23 | #define SIG_DFL ((__force __sighandler_t)0) /* default signal handling */ | ||
24 | #define SIG_IGN ((__force __sighandler_t)1) /* ignore signal */ | ||
25 | #define SIG_ERR ((__force __sighandler_t)-1) /* error return from signal */ | ||
26 | #endif | ||
27 | |||
28 | #endif /* __ASM_GENERIC_SIGNAL_DEFS_H */ | ||
diff --git a/include/uapi/asm-generic/signal.h b/include/uapi/asm-generic/signal.h new file mode 100644 index 000000000000..0a78028984de --- /dev/null +++ b/include/uapi/asm-generic/signal.h | |||
@@ -0,0 +1,123 @@ | |||
1 | #ifndef _UAPI__ASM_GENERIC_SIGNAL_H | ||
2 | #define _UAPI__ASM_GENERIC_SIGNAL_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | #define _NSIG 64 | ||
7 | #define _NSIG_BPW __BITS_PER_LONG | ||
8 | #define _NSIG_WORDS (_NSIG / _NSIG_BPW) | ||
9 | |||
10 | #define SIGHUP 1 | ||
11 | #define SIGINT 2 | ||
12 | #define SIGQUIT 3 | ||
13 | #define SIGILL 4 | ||
14 | #define SIGTRAP 5 | ||
15 | #define SIGABRT 6 | ||
16 | #define SIGIOT 6 | ||
17 | #define SIGBUS 7 | ||
18 | #define SIGFPE 8 | ||
19 | #define SIGKILL 9 | ||
20 | #define SIGUSR1 10 | ||
21 | #define SIGSEGV 11 | ||
22 | #define SIGUSR2 12 | ||
23 | #define SIGPIPE 13 | ||
24 | #define SIGALRM 14 | ||
25 | #define SIGTERM 15 | ||
26 | #define SIGSTKFLT 16 | ||
27 | #define SIGCHLD 17 | ||
28 | #define SIGCONT 18 | ||
29 | #define SIGSTOP 19 | ||
30 | #define SIGTSTP 20 | ||
31 | #define SIGTTIN 21 | ||
32 | #define SIGTTOU 22 | ||
33 | #define SIGURG 23 | ||
34 | #define SIGXCPU 24 | ||
35 | #define SIGXFSZ 25 | ||
36 | #define SIGVTALRM 26 | ||
37 | #define SIGPROF 27 | ||
38 | #define SIGWINCH 28 | ||
39 | #define SIGIO 29 | ||
40 | #define SIGPOLL SIGIO | ||
41 | /* | ||
42 | #define SIGLOST 29 | ||
43 | */ | ||
44 | #define SIGPWR 30 | ||
45 | #define SIGSYS 31 | ||
46 | #define SIGUNUSED 31 | ||
47 | |||
48 | /* These should not be considered constants from userland. */ | ||
49 | #define SIGRTMIN 32 | ||
50 | #ifndef SIGRTMAX | ||
51 | #define SIGRTMAX _NSIG | ||
52 | #endif | ||
53 | |||
54 | /* | ||
55 | * SA_FLAGS values: | ||
56 | * | ||
57 | * SA_ONSTACK indicates that a registered stack_t will be used. | ||
58 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
59 | * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. | ||
60 | * SA_RESETHAND clears the handler when the signal is delivered. | ||
61 | * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. | ||
62 | * SA_NODEFER prevents the current signal from being masked in the handler. | ||
63 | * | ||
64 | * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single | ||
65 | * Unix names RESETHAND and NODEFER respectively. | ||
66 | */ | ||
67 | #define SA_NOCLDSTOP 0x00000001 | ||
68 | #define SA_NOCLDWAIT 0x00000002 | ||
69 | #define SA_SIGINFO 0x00000004 | ||
70 | #define SA_ONSTACK 0x08000000 | ||
71 | #define SA_RESTART 0x10000000 | ||
72 | #define SA_NODEFER 0x40000000 | ||
73 | #define SA_RESETHAND 0x80000000 | ||
74 | |||
75 | #define SA_NOMASK SA_NODEFER | ||
76 | #define SA_ONESHOT SA_RESETHAND | ||
77 | |||
78 | /* | ||
79 | * New architectures should not define the obsolete | ||
80 | * SA_RESTORER 0x04000000 | ||
81 | */ | ||
82 | |||
83 | /* | ||
84 | * sigaltstack controls | ||
85 | */ | ||
86 | #define SS_ONSTACK 1 | ||
87 | #define SS_DISABLE 2 | ||
88 | |||
89 | #define MINSIGSTKSZ 2048 | ||
90 | #define SIGSTKSZ 8192 | ||
91 | |||
92 | #ifndef __ASSEMBLY__ | ||
93 | typedef struct { | ||
94 | unsigned long sig[_NSIG_WORDS]; | ||
95 | } sigset_t; | ||
96 | |||
97 | /* not actually used, but required for linux/syscalls.h */ | ||
98 | typedef unsigned long old_sigset_t; | ||
99 | |||
100 | #include <asm-generic/signal-defs.h> | ||
101 | |||
102 | struct sigaction { | ||
103 | __sighandler_t sa_handler; | ||
104 | unsigned long sa_flags; | ||
105 | #ifdef SA_RESTORER | ||
106 | __sigrestore_t sa_restorer; | ||
107 | #endif | ||
108 | sigset_t sa_mask; /* mask last for extensibility */ | ||
109 | }; | ||
110 | |||
111 | struct k_sigaction { | ||
112 | struct sigaction sa; | ||
113 | }; | ||
114 | |||
115 | typedef struct sigaltstack { | ||
116 | void __user *ss_sp; | ||
117 | int ss_flags; | ||
118 | size_t ss_size; | ||
119 | } stack_t; | ||
120 | |||
121 | #endif /* __ASSEMBLY__ */ | ||
122 | |||
123 | #endif /* _UAPI__ASM_GENERIC_SIGNAL_H */ | ||
diff --git a/include/uapi/asm-generic/socket.h b/include/uapi/asm-generic/socket.h new file mode 100644 index 000000000000..b1bea03274d5 --- /dev/null +++ b/include/uapi/asm-generic/socket.h | |||
@@ -0,0 +1,75 @@ | |||
1 | #ifndef __ASM_GENERIC_SOCKET_H | ||
2 | #define __ASM_GENERIC_SOCKET_H | ||
3 | |||
4 | #include <asm/sockios.h> | ||
5 | |||
6 | /* For setsockopt(2) */ | ||
7 | #define SOL_SOCKET 1 | ||
8 | |||
9 | #define SO_DEBUG 1 | ||
10 | #define SO_REUSEADDR 2 | ||
11 | #define SO_TYPE 3 | ||
12 | #define SO_ERROR 4 | ||
13 | #define SO_DONTROUTE 5 | ||
14 | #define SO_BROADCAST 6 | ||
15 | #define SO_SNDBUF 7 | ||
16 | #define SO_RCVBUF 8 | ||
17 | #define SO_SNDBUFFORCE 32 | ||
18 | #define SO_RCVBUFFORCE 33 | ||
19 | #define SO_KEEPALIVE 9 | ||
20 | #define SO_OOBINLINE 10 | ||
21 | #define SO_NO_CHECK 11 | ||
22 | #define SO_PRIORITY 12 | ||
23 | #define SO_LINGER 13 | ||
24 | #define SO_BSDCOMPAT 14 | ||
25 | /* To add :#define SO_REUSEPORT 15 */ | ||
26 | |||
27 | #ifndef SO_PASSCRED /* powerpc only differs in these */ | ||
28 | #define SO_PASSCRED 16 | ||
29 | #define SO_PEERCRED 17 | ||
30 | #define SO_RCVLOWAT 18 | ||
31 | #define SO_SNDLOWAT 19 | ||
32 | #define SO_RCVTIMEO 20 | ||
33 | #define SO_SNDTIMEO 21 | ||
34 | #endif | ||
35 | |||
36 | /* Security levels - as per NRL IPv6 - don't actually do anything */ | ||
37 | #define SO_SECURITY_AUTHENTICATION 22 | ||
38 | #define SO_SECURITY_ENCRYPTION_TRANSPORT 23 | ||
39 | #define SO_SECURITY_ENCRYPTION_NETWORK 24 | ||
40 | |||
41 | #define SO_BINDTODEVICE 25 | ||
42 | |||
43 | /* Socket filtering */ | ||
44 | #define SO_ATTACH_FILTER 26 | ||
45 | #define SO_DETACH_FILTER 27 | ||
46 | |||
47 | #define SO_PEERNAME 28 | ||
48 | #define SO_TIMESTAMP 29 | ||
49 | #define SCM_TIMESTAMP SO_TIMESTAMP | ||
50 | |||
51 | #define SO_ACCEPTCONN 30 | ||
52 | |||
53 | #define SO_PEERSEC 31 | ||
54 | #define SO_PASSSEC 34 | ||
55 | #define SO_TIMESTAMPNS 35 | ||
56 | #define SCM_TIMESTAMPNS SO_TIMESTAMPNS | ||
57 | |||
58 | #define SO_MARK 36 | ||
59 | |||
60 | #define SO_TIMESTAMPING 37 | ||
61 | #define SCM_TIMESTAMPING SO_TIMESTAMPING | ||
62 | |||
63 | #define SO_PROTOCOL 38 | ||
64 | #define SO_DOMAIN 39 | ||
65 | |||
66 | #define SO_RXQ_OVFL 40 | ||
67 | |||
68 | #define SO_WIFI_STATUS 41 | ||
69 | #define SCM_WIFI_STATUS SO_WIFI_STATUS | ||
70 | #define SO_PEEK_OFF 42 | ||
71 | |||
72 | /* Instruct lower device to use last 4-bytes of skb data as FCS */ | ||
73 | #define SO_NOFCS 43 | ||
74 | |||
75 | #endif /* __ASM_GENERIC_SOCKET_H */ | ||
diff --git a/include/uapi/asm-generic/sockios.h b/include/uapi/asm-generic/sockios.h new file mode 100644 index 000000000000..9a61a369b901 --- /dev/null +++ b/include/uapi/asm-generic/sockios.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #ifndef __ASM_GENERIC_SOCKIOS_H | ||
2 | #define __ASM_GENERIC_SOCKIOS_H | ||
3 | |||
4 | /* Socket-level I/O control calls. */ | ||
5 | #define FIOSETOWN 0x8901 | ||
6 | #define SIOCSPGRP 0x8902 | ||
7 | #define FIOGETOWN 0x8903 | ||
8 | #define SIOCGPGRP 0x8904 | ||
9 | #define SIOCATMARK 0x8905 | ||
10 | #define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ | ||
11 | #define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ | ||
12 | |||
13 | #endif /* __ASM_GENERIC_SOCKIOS_H */ | ||
diff --git a/include/uapi/asm-generic/stat.h b/include/uapi/asm-generic/stat.h new file mode 100644 index 000000000000..bd8cad21998e --- /dev/null +++ b/include/uapi/asm-generic/stat.h | |||
@@ -0,0 +1,72 @@ | |||
1 | #ifndef __ASM_GENERIC_STAT_H | ||
2 | #define __ASM_GENERIC_STAT_H | ||
3 | |||
4 | /* | ||
5 | * Everybody gets this wrong and has to stick with it for all | ||
6 | * eternity. Hopefully, this version gets used by new architectures | ||
7 | * so they don't fall into the same traps. | ||
8 | * | ||
9 | * stat64 is copied from powerpc64, with explicit padding added. | ||
10 | * stat is the same structure layout on 64-bit, without the 'long long' | ||
11 | * types. | ||
12 | * | ||
13 | * By convention, 64 bit architectures use the stat interface, while | ||
14 | * 32 bit architectures use the stat64 interface. Note that we don't | ||
15 | * provide an __old_kernel_stat here, which new architecture should | ||
16 | * not have to start with. | ||
17 | */ | ||
18 | |||
19 | #include <asm/bitsperlong.h> | ||
20 | |||
21 | #define STAT_HAVE_NSEC 1 | ||
22 | |||
23 | struct stat { | ||
24 | unsigned long st_dev; /* Device. */ | ||
25 | unsigned long st_ino; /* File serial number. */ | ||
26 | unsigned int st_mode; /* File mode. */ | ||
27 | unsigned int st_nlink; /* Link count. */ | ||
28 | unsigned int st_uid; /* User ID of the file's owner. */ | ||
29 | unsigned int st_gid; /* Group ID of the file's group. */ | ||
30 | unsigned long st_rdev; /* Device number, if device. */ | ||
31 | unsigned long __pad1; | ||
32 | long st_size; /* Size of file, in bytes. */ | ||
33 | int st_blksize; /* Optimal block size for I/O. */ | ||
34 | int __pad2; | ||
35 | long st_blocks; /* Number 512-byte blocks allocated. */ | ||
36 | long st_atime; /* Time of last access. */ | ||
37 | unsigned long st_atime_nsec; | ||
38 | long st_mtime; /* Time of last modification. */ | ||
39 | unsigned long st_mtime_nsec; | ||
40 | long st_ctime; /* Time of last status change. */ | ||
41 | unsigned long st_ctime_nsec; | ||
42 | unsigned int __unused4; | ||
43 | unsigned int __unused5; | ||
44 | }; | ||
45 | |||
46 | /* This matches struct stat64 in glibc2.1. Only used for 32 bit. */ | ||
47 | #if __BITS_PER_LONG != 64 || defined(__ARCH_WANT_STAT64) | ||
48 | struct stat64 { | ||
49 | unsigned long long st_dev; /* Device. */ | ||
50 | unsigned long long st_ino; /* File serial number. */ | ||
51 | unsigned int st_mode; /* File mode. */ | ||
52 | unsigned int st_nlink; /* Link count. */ | ||
53 | unsigned int st_uid; /* User ID of the file's owner. */ | ||
54 | unsigned int st_gid; /* Group ID of the file's group. */ | ||
55 | unsigned long long st_rdev; /* Device number, if device. */ | ||
56 | unsigned long long __pad1; | ||
57 | long long st_size; /* Size of file, in bytes. */ | ||
58 | int st_blksize; /* Optimal block size for I/O. */ | ||
59 | int __pad2; | ||
60 | long long st_blocks; /* Number 512-byte blocks allocated. */ | ||
61 | int st_atime; /* Time of last access. */ | ||
62 | unsigned int st_atime_nsec; | ||
63 | int st_mtime; /* Time of last modification. */ | ||
64 | unsigned int st_mtime_nsec; | ||
65 | int st_ctime; /* Time of last status change. */ | ||
66 | unsigned int st_ctime_nsec; | ||
67 | unsigned int __unused4; | ||
68 | unsigned int __unused5; | ||
69 | }; | ||
70 | #endif | ||
71 | |||
72 | #endif /* __ASM_GENERIC_STAT_H */ | ||
diff --git a/include/uapi/asm-generic/statfs.h b/include/uapi/asm-generic/statfs.h new file mode 100644 index 000000000000..0999647fca13 --- /dev/null +++ b/include/uapi/asm-generic/statfs.h | |||
@@ -0,0 +1,83 @@ | |||
1 | #ifndef _UAPI_GENERIC_STATFS_H | ||
2 | #define _UAPI_GENERIC_STATFS_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | |||
7 | /* | ||
8 | * Most 64-bit platforms use 'long', while most 32-bit platforms use '__u32'. | ||
9 | * Yes, they differ in signedness as well as size. | ||
10 | * Special cases can override it for themselves -- except for S390x, which | ||
11 | * is just a little too special for us. And MIPS, which I'm not touching | ||
12 | * with a 10' pole. | ||
13 | */ | ||
14 | #ifndef __statfs_word | ||
15 | #if __BITS_PER_LONG == 64 | ||
16 | #define __statfs_word long | ||
17 | #else | ||
18 | #define __statfs_word __u32 | ||
19 | #endif | ||
20 | #endif | ||
21 | |||
22 | struct statfs { | ||
23 | __statfs_word f_type; | ||
24 | __statfs_word f_bsize; | ||
25 | __statfs_word f_blocks; | ||
26 | __statfs_word f_bfree; | ||
27 | __statfs_word f_bavail; | ||
28 | __statfs_word f_files; | ||
29 | __statfs_word f_ffree; | ||
30 | __kernel_fsid_t f_fsid; | ||
31 | __statfs_word f_namelen; | ||
32 | __statfs_word f_frsize; | ||
33 | __statfs_word f_flags; | ||
34 | __statfs_word f_spare[4]; | ||
35 | }; | ||
36 | |||
37 | /* | ||
38 | * ARM needs to avoid the 32-bit padding at the end, for consistency | ||
39 | * between EABI and OABI | ||
40 | */ | ||
41 | #ifndef ARCH_PACK_STATFS64 | ||
42 | #define ARCH_PACK_STATFS64 | ||
43 | #endif | ||
44 | |||
45 | struct statfs64 { | ||
46 | __statfs_word f_type; | ||
47 | __statfs_word f_bsize; | ||
48 | __u64 f_blocks; | ||
49 | __u64 f_bfree; | ||
50 | __u64 f_bavail; | ||
51 | __u64 f_files; | ||
52 | __u64 f_ffree; | ||
53 | __kernel_fsid_t f_fsid; | ||
54 | __statfs_word f_namelen; | ||
55 | __statfs_word f_frsize; | ||
56 | __statfs_word f_flags; | ||
57 | __statfs_word f_spare[4]; | ||
58 | } ARCH_PACK_STATFS64; | ||
59 | |||
60 | /* | ||
61 | * IA64 and x86_64 need to avoid the 32-bit padding at the end, | ||
62 | * to be compatible with the i386 ABI | ||
63 | */ | ||
64 | #ifndef ARCH_PACK_COMPAT_STATFS64 | ||
65 | #define ARCH_PACK_COMPAT_STATFS64 | ||
66 | #endif | ||
67 | |||
68 | struct compat_statfs64 { | ||
69 | __u32 f_type; | ||
70 | __u32 f_bsize; | ||
71 | __u64 f_blocks; | ||
72 | __u64 f_bfree; | ||
73 | __u64 f_bavail; | ||
74 | __u64 f_files; | ||
75 | __u64 f_ffree; | ||
76 | __kernel_fsid_t f_fsid; | ||
77 | __u32 f_namelen; | ||
78 | __u32 f_frsize; | ||
79 | __u32 f_flags; | ||
80 | __u32 f_spare[4]; | ||
81 | } ARCH_PACK_COMPAT_STATFS64; | ||
82 | |||
83 | #endif /* _UAPI_GENERIC_STATFS_H */ | ||
diff --git a/include/uapi/asm-generic/swab.h b/include/uapi/asm-generic/swab.h new file mode 100644 index 000000000000..a8e9029d9eba --- /dev/null +++ b/include/uapi/asm-generic/swab.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #ifndef _ASM_GENERIC_SWAB_H | ||
2 | #define _ASM_GENERIC_SWAB_H | ||
3 | |||
4 | #include <asm/bitsperlong.h> | ||
5 | |||
6 | /* | ||
7 | * 32 bit architectures typically (but not always) want to | ||
8 | * set __SWAB_64_THRU_32__. In user space, this is only | ||
9 | * valid if the compiler supports 64 bit data types. | ||
10 | */ | ||
11 | |||
12 | #if __BITS_PER_LONG == 32 | ||
13 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) | ||
14 | #define __SWAB_64_THRU_32__ | ||
15 | #endif | ||
16 | #endif | ||
17 | |||
18 | #endif /* _ASM_GENERIC_SWAB_H */ | ||
diff --git a/include/uapi/asm-generic/termbits.h b/include/uapi/asm-generic/termbits.h new file mode 100644 index 000000000000..232b4781aef3 --- /dev/null +++ b/include/uapi/asm-generic/termbits.h | |||
@@ -0,0 +1,199 @@ | |||
1 | #ifndef __ASM_GENERIC_TERMBITS_H | ||
2 | #define __ASM_GENERIC_TERMBITS_H | ||
3 | |||
4 | #include <linux/posix_types.h> | ||
5 | |||
6 | typedef unsigned char cc_t; | ||
7 | typedef unsigned int speed_t; | ||
8 | typedef unsigned int tcflag_t; | ||
9 | |||
10 | #define NCCS 19 | ||
11 | struct termios { | ||
12 | tcflag_t c_iflag; /* input mode flags */ | ||
13 | tcflag_t c_oflag; /* output mode flags */ | ||
14 | tcflag_t c_cflag; /* control mode flags */ | ||
15 | tcflag_t c_lflag; /* local mode flags */ | ||
16 | cc_t c_line; /* line discipline */ | ||
17 | cc_t c_cc[NCCS]; /* control characters */ | ||
18 | }; | ||
19 | |||
20 | struct termios2 { | ||
21 | tcflag_t c_iflag; /* input mode flags */ | ||
22 | tcflag_t c_oflag; /* output mode flags */ | ||
23 | tcflag_t c_cflag; /* control mode flags */ | ||
24 | tcflag_t c_lflag; /* local mode flags */ | ||
25 | cc_t c_line; /* line discipline */ | ||
26 | cc_t c_cc[NCCS]; /* control characters */ | ||
27 | speed_t c_ispeed; /* input speed */ | ||
28 | speed_t c_ospeed; /* output speed */ | ||
29 | }; | ||
30 | |||
31 | struct ktermios { | ||
32 | tcflag_t c_iflag; /* input mode flags */ | ||
33 | tcflag_t c_oflag; /* output mode flags */ | ||
34 | tcflag_t c_cflag; /* control mode flags */ | ||
35 | tcflag_t c_lflag; /* local mode flags */ | ||
36 | cc_t c_line; /* line discipline */ | ||
37 | cc_t c_cc[NCCS]; /* control characters */ | ||
38 | speed_t c_ispeed; /* input speed */ | ||
39 | speed_t c_ospeed; /* output speed */ | ||
40 | }; | ||
41 | |||
42 | /* c_cc characters */ | ||
43 | #define VINTR 0 | ||
44 | #define VQUIT 1 | ||
45 | #define VERASE 2 | ||
46 | #define VKILL 3 | ||
47 | #define VEOF 4 | ||
48 | #define VTIME 5 | ||
49 | #define VMIN 6 | ||
50 | #define VSWTC 7 | ||
51 | #define VSTART 8 | ||
52 | #define VSTOP 9 | ||
53 | #define VSUSP 10 | ||
54 | #define VEOL 11 | ||
55 | #define VREPRINT 12 | ||
56 | #define VDISCARD 13 | ||
57 | #define VWERASE 14 | ||
58 | #define VLNEXT 15 | ||
59 | #define VEOL2 16 | ||
60 | |||
61 | /* c_iflag bits */ | ||
62 | #define IGNBRK 0000001 | ||
63 | #define BRKINT 0000002 | ||
64 | #define IGNPAR 0000004 | ||
65 | #define PARMRK 0000010 | ||
66 | #define INPCK 0000020 | ||
67 | #define ISTRIP 0000040 | ||
68 | #define INLCR 0000100 | ||
69 | #define IGNCR 0000200 | ||
70 | #define ICRNL 0000400 | ||
71 | #define IUCLC 0001000 | ||
72 | #define IXON 0002000 | ||
73 | #define IXANY 0004000 | ||
74 | #define IXOFF 0010000 | ||
75 | #define IMAXBEL 0020000 | ||
76 | #define IUTF8 0040000 | ||
77 | |||
78 | /* c_oflag bits */ | ||
79 | #define OPOST 0000001 | ||
80 | #define OLCUC 0000002 | ||
81 | #define ONLCR 0000004 | ||
82 | #define OCRNL 0000010 | ||
83 | #define ONOCR 0000020 | ||
84 | #define ONLRET 0000040 | ||
85 | #define OFILL 0000100 | ||
86 | #define OFDEL 0000200 | ||
87 | #define NLDLY 0000400 | ||
88 | #define NL0 0000000 | ||
89 | #define NL1 0000400 | ||
90 | #define CRDLY 0003000 | ||
91 | #define CR0 0000000 | ||
92 | #define CR1 0001000 | ||
93 | #define CR2 0002000 | ||
94 | #define CR3 0003000 | ||
95 | #define TABDLY 0014000 | ||
96 | #define TAB0 0000000 | ||
97 | #define TAB1 0004000 | ||
98 | #define TAB2 0010000 | ||
99 | #define TAB3 0014000 | ||
100 | #define XTABS 0014000 | ||
101 | #define BSDLY 0020000 | ||
102 | #define BS0 0000000 | ||
103 | #define BS1 0020000 | ||
104 | #define VTDLY 0040000 | ||
105 | #define VT0 0000000 | ||
106 | #define VT1 0040000 | ||
107 | #define FFDLY 0100000 | ||
108 | #define FF0 0000000 | ||
109 | #define FF1 0100000 | ||
110 | |||
111 | /* c_cflag bit meaning */ | ||
112 | #define CBAUD 0010017 | ||
113 | #define B0 0000000 /* hang up */ | ||
114 | #define B50 0000001 | ||
115 | #define B75 0000002 | ||
116 | #define B110 0000003 | ||
117 | #define B134 0000004 | ||
118 | #define B150 0000005 | ||
119 | #define B200 0000006 | ||
120 | #define B300 0000007 | ||
121 | #define B600 0000010 | ||
122 | #define B1200 0000011 | ||
123 | #define B1800 0000012 | ||
124 | #define B2400 0000013 | ||
125 | #define B4800 0000014 | ||
126 | #define B9600 0000015 | ||
127 | #define B19200 0000016 | ||
128 | #define B38400 0000017 | ||
129 | #define EXTA B19200 | ||
130 | #define EXTB B38400 | ||
131 | #define CSIZE 0000060 | ||
132 | #define CS5 0000000 | ||
133 | #define CS6 0000020 | ||
134 | #define CS7 0000040 | ||
135 | #define CS8 0000060 | ||
136 | #define CSTOPB 0000100 | ||
137 | #define CREAD 0000200 | ||
138 | #define PARENB 0000400 | ||
139 | #define PARODD 0001000 | ||
140 | #define HUPCL 0002000 | ||
141 | #define CLOCAL 0004000 | ||
142 | #define CBAUDEX 0010000 | ||
143 | #define BOTHER 0010000 | ||
144 | #define B57600 0010001 | ||
145 | #define B115200 0010002 | ||
146 | #define B230400 0010003 | ||
147 | #define B460800 0010004 | ||
148 | #define B500000 0010005 | ||
149 | #define B576000 0010006 | ||
150 | #define B921600 0010007 | ||
151 | #define B1000000 0010010 | ||
152 | #define B1152000 0010011 | ||
153 | #define B1500000 0010012 | ||
154 | #define B2000000 0010013 | ||
155 | #define B2500000 0010014 | ||
156 | #define B3000000 0010015 | ||
157 | #define B3500000 0010016 | ||
158 | #define B4000000 0010017 | ||
159 | #define CIBAUD 002003600000 /* input baud rate */ | ||
160 | #define CMSPAR 010000000000 /* mark or space (stick) parity */ | ||
161 | #define CRTSCTS 020000000000 /* flow control */ | ||
162 | |||
163 | #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ | ||
164 | |||
165 | /* c_lflag bits */ | ||
166 | #define ISIG 0000001 | ||
167 | #define ICANON 0000002 | ||
168 | #define XCASE 0000004 | ||
169 | #define ECHO 0000010 | ||
170 | #define ECHOE 0000020 | ||
171 | #define ECHOK 0000040 | ||
172 | #define ECHONL 0000100 | ||
173 | #define NOFLSH 0000200 | ||
174 | #define TOSTOP 0000400 | ||
175 | #define ECHOCTL 0001000 | ||
176 | #define ECHOPRT 0002000 | ||
177 | #define ECHOKE 0004000 | ||
178 | #define FLUSHO 0010000 | ||
179 | #define PENDIN 0040000 | ||
180 | #define IEXTEN 0100000 | ||
181 | #define EXTPROC 0200000 | ||
182 | |||
183 | /* tcflow() and TCXONC use these */ | ||
184 | #define TCOOFF 0 | ||
185 | #define TCOON 1 | ||
186 | #define TCIOFF 2 | ||
187 | #define TCION 3 | ||
188 | |||
189 | /* tcflush() and TCFLSH use these */ | ||
190 | #define TCIFLUSH 0 | ||
191 | #define TCOFLUSH 1 | ||
192 | #define TCIOFLUSH 2 | ||
193 | |||
194 | /* tcsetattr uses these */ | ||
195 | #define TCSANOW 0 | ||
196 | #define TCSADRAIN 1 | ||
197 | #define TCSAFLUSH 2 | ||
198 | |||
199 | #endif /* __ASM_GENERIC_TERMBITS_H */ | ||
diff --git a/include/uapi/asm-generic/termios.h b/include/uapi/asm-generic/termios.h new file mode 100644 index 000000000000..088176062133 --- /dev/null +++ b/include/uapi/asm-generic/termios.h | |||
@@ -0,0 +1,50 @@ | |||
1 | #ifndef _UAPI_ASM_GENERIC_TERMIOS_H | ||
2 | #define _UAPI_ASM_GENERIC_TERMIOS_H | ||
3 | /* | ||
4 | * Most architectures have straight copies of the x86 code, with | ||
5 | * varying levels of bug fixes on top. Usually it's a good idea | ||
6 | * to use this generic version instead, but be careful to avoid | ||
7 | * ABI changes. | ||
8 | * New architectures should not provide their own version. | ||
9 | */ | ||
10 | |||
11 | #include <asm/termbits.h> | ||
12 | #include <asm/ioctls.h> | ||
13 | |||
14 | struct winsize { | ||
15 | unsigned short ws_row; | ||
16 | unsigned short ws_col; | ||
17 | unsigned short ws_xpixel; | ||
18 | unsigned short ws_ypixel; | ||
19 | }; | ||
20 | |||
21 | #define NCC 8 | ||
22 | struct termio { | ||
23 | unsigned short c_iflag; /* input mode flags */ | ||
24 | unsigned short c_oflag; /* output mode flags */ | ||
25 | unsigned short c_cflag; /* control mode flags */ | ||
26 | unsigned short c_lflag; /* local mode flags */ | ||
27 | unsigned char c_line; /* line discipline */ | ||
28 | unsigned char c_cc[NCC]; /* control characters */ | ||
29 | }; | ||
30 | |||
31 | /* modem lines */ | ||
32 | #define TIOCM_LE 0x001 | ||
33 | #define TIOCM_DTR 0x002 | ||
34 | #define TIOCM_RTS 0x004 | ||
35 | #define TIOCM_ST 0x008 | ||
36 | #define TIOCM_SR 0x010 | ||
37 | #define TIOCM_CTS 0x020 | ||
38 | #define TIOCM_CAR 0x040 | ||
39 | #define TIOCM_RNG 0x080 | ||
40 | #define TIOCM_DSR 0x100 | ||
41 | #define TIOCM_CD TIOCM_CAR | ||
42 | #define TIOCM_RI TIOCM_RNG | ||
43 | #define TIOCM_OUT1 0x2000 | ||
44 | #define TIOCM_OUT2 0x4000 | ||
45 | #define TIOCM_LOOP 0x8000 | ||
46 | |||
47 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
48 | |||
49 | |||
50 | #endif /* _UAPI_ASM_GENERIC_TERMIOS_H */ | ||
diff --git a/include/uapi/asm-generic/types.h b/include/uapi/asm-generic/types.h new file mode 100644 index 000000000000..bd39806013b5 --- /dev/null +++ b/include/uapi/asm-generic/types.h | |||
@@ -0,0 +1,9 @@ | |||
1 | #ifndef _ASM_GENERIC_TYPES_H | ||
2 | #define _ASM_GENERIC_TYPES_H | ||
3 | /* | ||
4 | * int-ll64 is used practically everywhere now, | ||
5 | * so use it as a reasonable default. | ||
6 | */ | ||
7 | #include <asm-generic/int-ll64.h> | ||
8 | |||
9 | #endif /* _ASM_GENERIC_TYPES_H */ | ||
diff --git a/include/uapi/asm-generic/ucontext.h b/include/uapi/asm-generic/ucontext.h new file mode 100644 index 000000000000..ad77343e8a9a --- /dev/null +++ b/include/uapi/asm-generic/ucontext.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #ifndef __ASM_GENERIC_UCONTEXT_H | ||
2 | #define __ASM_GENERIC_UCONTEXT_H | ||
3 | |||
4 | struct ucontext { | ||
5 | unsigned long uc_flags; | ||
6 | struct ucontext *uc_link; | ||
7 | stack_t uc_stack; | ||
8 | struct sigcontext uc_mcontext; | ||
9 | sigset_t uc_sigmask; /* mask last for extensibility */ | ||
10 | }; | ||
11 | |||
12 | #endif /* __ASM_GENERIC_UCONTEXT_H */ | ||
diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h new file mode 100644 index 000000000000..6e595ba545f4 --- /dev/null +++ b/include/uapi/asm-generic/unistd.h | |||
@@ -0,0 +1,902 @@ | |||
1 | #include <asm/bitsperlong.h> | ||
2 | |||
3 | /* | ||
4 | * This file contains the system call numbers, based on the | ||
5 | * layout of the x86-64 architecture, which embeds the | ||
6 | * pointer to the syscall in the table. | ||
7 | * | ||
8 | * As a basic principle, no duplication of functionality | ||
9 | * should be added, e.g. we don't use lseek when llseek | ||
10 | * is present. New architectures should use this file | ||
11 | * and implement the less feature-full calls in user space. | ||
12 | */ | ||
13 | |||
14 | #ifndef __SYSCALL | ||
15 | #define __SYSCALL(x, y) | ||
16 | #endif | ||
17 | |||
18 | #if __BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT) | ||
19 | #define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _32) | ||
20 | #else | ||
21 | #define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _64) | ||
22 | #endif | ||
23 | |||
24 | #ifdef __SYSCALL_COMPAT | ||
25 | #define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _comp) | ||
26 | #define __SC_COMP_3264(_nr, _32, _64, _comp) __SYSCALL(_nr, _comp) | ||
27 | #else | ||
28 | #define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _sys) | ||
29 | #define __SC_COMP_3264(_nr, _32, _64, _comp) __SC_3264(_nr, _32, _64) | ||
30 | #endif | ||
31 | |||
32 | #define __NR_io_setup 0 | ||
33 | __SC_COMP(__NR_io_setup, sys_io_setup, compat_sys_io_setup) | ||
34 | #define __NR_io_destroy 1 | ||
35 | __SYSCALL(__NR_io_destroy, sys_io_destroy) | ||
36 | #define __NR_io_submit 2 | ||
37 | __SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit) | ||
38 | #define __NR_io_cancel 3 | ||
39 | __SYSCALL(__NR_io_cancel, sys_io_cancel) | ||
40 | #define __NR_io_getevents 4 | ||
41 | __SC_COMP(__NR_io_getevents, sys_io_getevents, compat_sys_io_getevents) | ||
42 | |||
43 | /* fs/xattr.c */ | ||
44 | #define __NR_setxattr 5 | ||
45 | __SYSCALL(__NR_setxattr, sys_setxattr) | ||
46 | #define __NR_lsetxattr 6 | ||
47 | __SYSCALL(__NR_lsetxattr, sys_lsetxattr) | ||
48 | #define __NR_fsetxattr 7 | ||
49 | __SYSCALL(__NR_fsetxattr, sys_fsetxattr) | ||
50 | #define __NR_getxattr 8 | ||
51 | __SYSCALL(__NR_getxattr, sys_getxattr) | ||
52 | #define __NR_lgetxattr 9 | ||
53 | __SYSCALL(__NR_lgetxattr, sys_lgetxattr) | ||
54 | #define __NR_fgetxattr 10 | ||
55 | __SYSCALL(__NR_fgetxattr, sys_fgetxattr) | ||
56 | #define __NR_listxattr 11 | ||
57 | __SYSCALL(__NR_listxattr, sys_listxattr) | ||
58 | #define __NR_llistxattr 12 | ||
59 | __SYSCALL(__NR_llistxattr, sys_llistxattr) | ||
60 | #define __NR_flistxattr 13 | ||
61 | __SYSCALL(__NR_flistxattr, sys_flistxattr) | ||
62 | #define __NR_removexattr 14 | ||
63 | __SYSCALL(__NR_removexattr, sys_removexattr) | ||
64 | #define __NR_lremovexattr 15 | ||
65 | __SYSCALL(__NR_lremovexattr, sys_lremovexattr) | ||
66 | #define __NR_fremovexattr 16 | ||
67 | __SYSCALL(__NR_fremovexattr, sys_fremovexattr) | ||
68 | |||
69 | /* fs/dcache.c */ | ||
70 | #define __NR_getcwd 17 | ||
71 | __SYSCALL(__NR_getcwd, sys_getcwd) | ||
72 | |||
73 | /* fs/cookies.c */ | ||
74 | #define __NR_lookup_dcookie 18 | ||
75 | __SC_COMP(__NR_lookup_dcookie, sys_lookup_dcookie, compat_sys_lookup_dcookie) | ||
76 | |||
77 | /* fs/eventfd.c */ | ||
78 | #define __NR_eventfd2 19 | ||
79 | __SYSCALL(__NR_eventfd2, sys_eventfd2) | ||
80 | |||
81 | /* fs/eventpoll.c */ | ||
82 | #define __NR_epoll_create1 20 | ||
83 | __SYSCALL(__NR_epoll_create1, sys_epoll_create1) | ||
84 | #define __NR_epoll_ctl 21 | ||
85 | __SYSCALL(__NR_epoll_ctl, sys_epoll_ctl) | ||
86 | #define __NR_epoll_pwait 22 | ||
87 | __SC_COMP(__NR_epoll_pwait, sys_epoll_pwait, compat_sys_epoll_pwait) | ||
88 | |||
89 | /* fs/fcntl.c */ | ||
90 | #define __NR_dup 23 | ||
91 | __SYSCALL(__NR_dup, sys_dup) | ||
92 | #define __NR_dup3 24 | ||
93 | __SYSCALL(__NR_dup3, sys_dup3) | ||
94 | #define __NR3264_fcntl 25 | ||
95 | __SC_COMP_3264(__NR3264_fcntl, sys_fcntl64, sys_fcntl, compat_sys_fcntl64) | ||
96 | |||
97 | /* fs/inotify_user.c */ | ||
98 | #define __NR_inotify_init1 26 | ||
99 | __SYSCALL(__NR_inotify_init1, sys_inotify_init1) | ||
100 | #define __NR_inotify_add_watch 27 | ||
101 | __SYSCALL(__NR_inotify_add_watch, sys_inotify_add_watch) | ||
102 | #define __NR_inotify_rm_watch 28 | ||
103 | __SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch) | ||
104 | |||
105 | /* fs/ioctl.c */ | ||
106 | #define __NR_ioctl 29 | ||
107 | __SC_COMP(__NR_ioctl, sys_ioctl, compat_sys_ioctl) | ||
108 | |||
109 | /* fs/ioprio.c */ | ||
110 | #define __NR_ioprio_set 30 | ||
111 | __SYSCALL(__NR_ioprio_set, sys_ioprio_set) | ||
112 | #define __NR_ioprio_get 31 | ||
113 | __SYSCALL(__NR_ioprio_get, sys_ioprio_get) | ||
114 | |||
115 | /* fs/locks.c */ | ||
116 | #define __NR_flock 32 | ||
117 | __SYSCALL(__NR_flock, sys_flock) | ||
118 | |||
119 | /* fs/namei.c */ | ||
120 | #define __NR_mknodat 33 | ||
121 | __SYSCALL(__NR_mknodat, sys_mknodat) | ||
122 | #define __NR_mkdirat 34 | ||
123 | __SYSCALL(__NR_mkdirat, sys_mkdirat) | ||
124 | #define __NR_unlinkat 35 | ||
125 | __SYSCALL(__NR_unlinkat, sys_unlinkat) | ||
126 | #define __NR_symlinkat 36 | ||
127 | __SYSCALL(__NR_symlinkat, sys_symlinkat) | ||
128 | #define __NR_linkat 37 | ||
129 | __SYSCALL(__NR_linkat, sys_linkat) | ||
130 | #define __NR_renameat 38 | ||
131 | __SYSCALL(__NR_renameat, sys_renameat) | ||
132 | |||
133 | /* fs/namespace.c */ | ||
134 | #define __NR_umount2 39 | ||
135 | __SYSCALL(__NR_umount2, sys_umount) | ||
136 | #define __NR_mount 40 | ||
137 | __SC_COMP(__NR_mount, sys_mount, compat_sys_mount) | ||
138 | #define __NR_pivot_root 41 | ||
139 | __SYSCALL(__NR_pivot_root, sys_pivot_root) | ||
140 | |||
141 | /* fs/nfsctl.c */ | ||
142 | #define __NR_nfsservctl 42 | ||
143 | __SYSCALL(__NR_nfsservctl, sys_ni_syscall) | ||
144 | |||
145 | /* fs/open.c */ | ||
146 | #define __NR3264_statfs 43 | ||
147 | __SC_COMP_3264(__NR3264_statfs, sys_statfs64, sys_statfs, \ | ||
148 | compat_sys_statfs64) | ||
149 | #define __NR3264_fstatfs 44 | ||
150 | __SC_COMP_3264(__NR3264_fstatfs, sys_fstatfs64, sys_fstatfs, \ | ||
151 | compat_sys_fstatfs64) | ||
152 | #define __NR3264_truncate 45 | ||
153 | __SC_COMP_3264(__NR3264_truncate, sys_truncate64, sys_truncate, \ | ||
154 | compat_sys_truncate64) | ||
155 | #define __NR3264_ftruncate 46 | ||
156 | __SC_COMP_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate, \ | ||
157 | compat_sys_ftruncate64) | ||
158 | |||
159 | #define __NR_fallocate 47 | ||
160 | __SC_COMP(__NR_fallocate, sys_fallocate, compat_sys_fallocate) | ||
161 | #define __NR_faccessat 48 | ||
162 | __SYSCALL(__NR_faccessat, sys_faccessat) | ||
163 | #define __NR_chdir 49 | ||
164 | __SYSCALL(__NR_chdir, sys_chdir) | ||
165 | #define __NR_fchdir 50 | ||
166 | __SYSCALL(__NR_fchdir, sys_fchdir) | ||
167 | #define __NR_chroot 51 | ||
168 | __SYSCALL(__NR_chroot, sys_chroot) | ||
169 | #define __NR_fchmod 52 | ||
170 | __SYSCALL(__NR_fchmod, sys_fchmod) | ||
171 | #define __NR_fchmodat 53 | ||
172 | __SYSCALL(__NR_fchmodat, sys_fchmodat) | ||
173 | #define __NR_fchownat 54 | ||
174 | __SYSCALL(__NR_fchownat, sys_fchownat) | ||
175 | #define __NR_fchown 55 | ||
176 | __SYSCALL(__NR_fchown, sys_fchown) | ||
177 | #define __NR_openat 56 | ||
178 | __SC_COMP(__NR_openat, sys_openat, compat_sys_openat) | ||
179 | #define __NR_close 57 | ||
180 | __SYSCALL(__NR_close, sys_close) | ||
181 | #define __NR_vhangup 58 | ||
182 | __SYSCALL(__NR_vhangup, sys_vhangup) | ||
183 | |||
184 | /* fs/pipe.c */ | ||
185 | #define __NR_pipe2 59 | ||
186 | __SYSCALL(__NR_pipe2, sys_pipe2) | ||
187 | |||
188 | /* fs/quota.c */ | ||
189 | #define __NR_quotactl 60 | ||
190 | __SYSCALL(__NR_quotactl, sys_quotactl) | ||
191 | |||
192 | /* fs/readdir.c */ | ||
193 | #define __NR_getdents64 61 | ||
194 | __SC_COMP(__NR_getdents64, sys_getdents64, compat_sys_getdents64) | ||
195 | |||
196 | /* fs/read_write.c */ | ||
197 | #define __NR3264_lseek 62 | ||
198 | __SC_3264(__NR3264_lseek, sys_llseek, sys_lseek) | ||
199 | #define __NR_read 63 | ||
200 | __SYSCALL(__NR_read, sys_read) | ||
201 | #define __NR_write 64 | ||
202 | __SYSCALL(__NR_write, sys_write) | ||
203 | #define __NR_readv 65 | ||
204 | __SC_COMP(__NR_readv, sys_readv, compat_sys_readv) | ||
205 | #define __NR_writev 66 | ||
206 | __SC_COMP(__NR_writev, sys_writev, compat_sys_writev) | ||
207 | #define __NR_pread64 67 | ||
208 | __SC_COMP(__NR_pread64, sys_pread64, compat_sys_pread64) | ||
209 | #define __NR_pwrite64 68 | ||
210 | __SC_COMP(__NR_pwrite64, sys_pwrite64, compat_sys_pwrite64) | ||
211 | #define __NR_preadv 69 | ||
212 | __SC_COMP(__NR_preadv, sys_preadv, compat_sys_preadv) | ||
213 | #define __NR_pwritev 70 | ||
214 | __SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev) | ||
215 | |||
216 | /* fs/sendfile.c */ | ||
217 | #define __NR3264_sendfile 71 | ||
218 | __SYSCALL(__NR3264_sendfile, sys_sendfile64) | ||
219 | |||
220 | /* fs/select.c */ | ||
221 | #define __NR_pselect6 72 | ||
222 | __SC_COMP(__NR_pselect6, sys_pselect6, compat_sys_pselect6) | ||
223 | #define __NR_ppoll 73 | ||
224 | __SC_COMP(__NR_ppoll, sys_ppoll, compat_sys_ppoll) | ||
225 | |||
226 | /* fs/signalfd.c */ | ||
227 | #define __NR_signalfd4 74 | ||
228 | __SC_COMP(__NR_signalfd4, sys_signalfd4, compat_sys_signalfd4) | ||
229 | |||
230 | /* fs/splice.c */ | ||
231 | #define __NR_vmsplice 75 | ||
232 | __SC_COMP(__NR_vmsplice, sys_vmsplice, compat_sys_vmsplice) | ||
233 | #define __NR_splice 76 | ||
234 | __SYSCALL(__NR_splice, sys_splice) | ||
235 | #define __NR_tee 77 | ||
236 | __SYSCALL(__NR_tee, sys_tee) | ||
237 | |||
238 | /* fs/stat.c */ | ||
239 | #define __NR_readlinkat 78 | ||
240 | __SYSCALL(__NR_readlinkat, sys_readlinkat) | ||
241 | #define __NR3264_fstatat 79 | ||
242 | __SC_3264(__NR3264_fstatat, sys_fstatat64, sys_newfstatat) | ||
243 | #define __NR3264_fstat 80 | ||
244 | __SC_3264(__NR3264_fstat, sys_fstat64, sys_newfstat) | ||
245 | |||
246 | /* fs/sync.c */ | ||
247 | #define __NR_sync 81 | ||
248 | __SYSCALL(__NR_sync, sys_sync) | ||
249 | #define __NR_fsync 82 | ||
250 | __SYSCALL(__NR_fsync, sys_fsync) | ||
251 | #define __NR_fdatasync 83 | ||
252 | __SYSCALL(__NR_fdatasync, sys_fdatasync) | ||
253 | #ifdef __ARCH_WANT_SYNC_FILE_RANGE2 | ||
254 | #define __NR_sync_file_range2 84 | ||
255 | __SC_COMP(__NR_sync_file_range2, sys_sync_file_range2, \ | ||
256 | compat_sys_sync_file_range2) | ||
257 | #else | ||
258 | #define __NR_sync_file_range 84 | ||
259 | __SC_COMP(__NR_sync_file_range, sys_sync_file_range, \ | ||
260 | compat_sys_sync_file_range) | ||
261 | #endif | ||
262 | |||
263 | /* fs/timerfd.c */ | ||
264 | #define __NR_timerfd_create 85 | ||
265 | __SYSCALL(__NR_timerfd_create, sys_timerfd_create) | ||
266 | #define __NR_timerfd_settime 86 | ||
267 | __SC_COMP(__NR_timerfd_settime, sys_timerfd_settime, \ | ||
268 | compat_sys_timerfd_settime) | ||
269 | #define __NR_timerfd_gettime 87 | ||
270 | __SC_COMP(__NR_timerfd_gettime, sys_timerfd_gettime, \ | ||
271 | compat_sys_timerfd_gettime) | ||
272 | |||
273 | /* fs/utimes.c */ | ||
274 | #define __NR_utimensat 88 | ||
275 | __SC_COMP(__NR_utimensat, sys_utimensat, compat_sys_utimensat) | ||
276 | |||
277 | /* kernel/acct.c */ | ||
278 | #define __NR_acct 89 | ||
279 | __SYSCALL(__NR_acct, sys_acct) | ||
280 | |||
281 | /* kernel/capability.c */ | ||
282 | #define __NR_capget 90 | ||
283 | __SYSCALL(__NR_capget, sys_capget) | ||
284 | #define __NR_capset 91 | ||
285 | __SYSCALL(__NR_capset, sys_capset) | ||
286 | |||
287 | /* kernel/exec_domain.c */ | ||
288 | #define __NR_personality 92 | ||
289 | __SYSCALL(__NR_personality, sys_personality) | ||
290 | |||
291 | /* kernel/exit.c */ | ||
292 | #define __NR_exit 93 | ||
293 | __SYSCALL(__NR_exit, sys_exit) | ||
294 | #define __NR_exit_group 94 | ||
295 | __SYSCALL(__NR_exit_group, sys_exit_group) | ||
296 | #define __NR_waitid 95 | ||
297 | __SC_COMP(__NR_waitid, sys_waitid, compat_sys_waitid) | ||
298 | |||
299 | /* kernel/fork.c */ | ||
300 | #define __NR_set_tid_address 96 | ||
301 | __SYSCALL(__NR_set_tid_address, sys_set_tid_address) | ||
302 | #define __NR_unshare 97 | ||
303 | __SYSCALL(__NR_unshare, sys_unshare) | ||
304 | |||
305 | /* kernel/futex.c */ | ||
306 | #define __NR_futex 98 | ||
307 | __SC_COMP(__NR_futex, sys_futex, compat_sys_futex) | ||
308 | #define __NR_set_robust_list 99 | ||
309 | __SC_COMP(__NR_set_robust_list, sys_set_robust_list, \ | ||
310 | compat_sys_set_robust_list) | ||
311 | #define __NR_get_robust_list 100 | ||
312 | __SC_COMP(__NR_get_robust_list, sys_get_robust_list, \ | ||
313 | compat_sys_get_robust_list) | ||
314 | |||
315 | /* kernel/hrtimer.c */ | ||
316 | #define __NR_nanosleep 101 | ||
317 | __SC_COMP(__NR_nanosleep, sys_nanosleep, compat_sys_nanosleep) | ||
318 | |||
319 | /* kernel/itimer.c */ | ||
320 | #define __NR_getitimer 102 | ||
321 | __SC_COMP(__NR_getitimer, sys_getitimer, compat_sys_getitimer) | ||
322 | #define __NR_setitimer 103 | ||
323 | __SC_COMP(__NR_setitimer, sys_setitimer, compat_sys_setitimer) | ||
324 | |||
325 | /* kernel/kexec.c */ | ||
326 | #define __NR_kexec_load 104 | ||
327 | __SC_COMP(__NR_kexec_load, sys_kexec_load, compat_sys_kexec_load) | ||
328 | |||
329 | /* kernel/module.c */ | ||
330 | #define __NR_init_module 105 | ||
331 | __SYSCALL(__NR_init_module, sys_init_module) | ||
332 | #define __NR_delete_module 106 | ||
333 | __SYSCALL(__NR_delete_module, sys_delete_module) | ||
334 | |||
335 | /* kernel/posix-timers.c */ | ||
336 | #define __NR_timer_create 107 | ||
337 | __SC_COMP(__NR_timer_create, sys_timer_create, compat_sys_timer_create) | ||
338 | #define __NR_timer_gettime 108 | ||
339 | __SC_COMP(__NR_timer_gettime, sys_timer_gettime, compat_sys_timer_gettime) | ||
340 | #define __NR_timer_getoverrun 109 | ||
341 | __SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun) | ||
342 | #define __NR_timer_settime 110 | ||
343 | __SC_COMP(__NR_timer_settime, sys_timer_settime, compat_sys_timer_settime) | ||
344 | #define __NR_timer_delete 111 | ||
345 | __SYSCALL(__NR_timer_delete, sys_timer_delete) | ||
346 | #define __NR_clock_settime 112 | ||
347 | __SC_COMP(__NR_clock_settime, sys_clock_settime, compat_sys_clock_settime) | ||
348 | #define __NR_clock_gettime 113 | ||
349 | __SC_COMP(__NR_clock_gettime, sys_clock_gettime, compat_sys_clock_gettime) | ||
350 | #define __NR_clock_getres 114 | ||
351 | __SC_COMP(__NR_clock_getres, sys_clock_getres, compat_sys_clock_getres) | ||
352 | #define __NR_clock_nanosleep 115 | ||
353 | __SC_COMP(__NR_clock_nanosleep, sys_clock_nanosleep, \ | ||
354 | compat_sys_clock_nanosleep) | ||
355 | |||
356 | /* kernel/printk.c */ | ||
357 | #define __NR_syslog 116 | ||
358 | __SYSCALL(__NR_syslog, sys_syslog) | ||
359 | |||
360 | /* kernel/ptrace.c */ | ||
361 | #define __NR_ptrace 117 | ||
362 | __SYSCALL(__NR_ptrace, sys_ptrace) | ||
363 | |||
364 | /* kernel/sched.c */ | ||
365 | #define __NR_sched_setparam 118 | ||
366 | __SYSCALL(__NR_sched_setparam, sys_sched_setparam) | ||
367 | #define __NR_sched_setscheduler 119 | ||
368 | __SYSCALL(__NR_sched_setscheduler, sys_sched_setscheduler) | ||
369 | #define __NR_sched_getscheduler 120 | ||
370 | __SYSCALL(__NR_sched_getscheduler, sys_sched_getscheduler) | ||
371 | #define __NR_sched_getparam 121 | ||
372 | __SYSCALL(__NR_sched_getparam, sys_sched_getparam) | ||
373 | #define __NR_sched_setaffinity 122 | ||
374 | __SC_COMP(__NR_sched_setaffinity, sys_sched_setaffinity, \ | ||
375 | compat_sys_sched_setaffinity) | ||
376 | #define __NR_sched_getaffinity 123 | ||
377 | __SC_COMP(__NR_sched_getaffinity, sys_sched_getaffinity, \ | ||
378 | compat_sys_sched_getaffinity) | ||
379 | #define __NR_sched_yield 124 | ||
380 | __SYSCALL(__NR_sched_yield, sys_sched_yield) | ||
381 | #define __NR_sched_get_priority_max 125 | ||
382 | __SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max) | ||
383 | #define __NR_sched_get_priority_min 126 | ||
384 | __SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min) | ||
385 | #define __NR_sched_rr_get_interval 127 | ||
386 | __SC_COMP(__NR_sched_rr_get_interval, sys_sched_rr_get_interval, \ | ||
387 | compat_sys_sched_rr_get_interval) | ||
388 | |||
389 | /* kernel/signal.c */ | ||
390 | #define __NR_restart_syscall 128 | ||
391 | __SYSCALL(__NR_restart_syscall, sys_restart_syscall) | ||
392 | #define __NR_kill 129 | ||
393 | __SYSCALL(__NR_kill, sys_kill) | ||
394 | #define __NR_tkill 130 | ||
395 | __SYSCALL(__NR_tkill, sys_tkill) | ||
396 | #define __NR_tgkill 131 | ||
397 | __SYSCALL(__NR_tgkill, sys_tgkill) | ||
398 | #define __NR_sigaltstack 132 | ||
399 | __SC_COMP(__NR_sigaltstack, sys_sigaltstack, compat_sys_sigaltstack) | ||
400 | #define __NR_rt_sigsuspend 133 | ||
401 | __SC_COMP(__NR_rt_sigsuspend, sys_rt_sigsuspend, compat_sys_rt_sigsuspend) | ||
402 | #define __NR_rt_sigaction 134 | ||
403 | __SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction) | ||
404 | #define __NR_rt_sigprocmask 135 | ||
405 | __SYSCALL(__NR_rt_sigprocmask, sys_rt_sigprocmask) | ||
406 | #define __NR_rt_sigpending 136 | ||
407 | __SYSCALL(__NR_rt_sigpending, sys_rt_sigpending) | ||
408 | #define __NR_rt_sigtimedwait 137 | ||
409 | __SC_COMP(__NR_rt_sigtimedwait, sys_rt_sigtimedwait, \ | ||
410 | compat_sys_rt_sigtimedwait) | ||
411 | #define __NR_rt_sigqueueinfo 138 | ||
412 | __SC_COMP(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, \ | ||
413 | compat_sys_rt_sigqueueinfo) | ||
414 | #define __NR_rt_sigreturn 139 | ||
415 | __SC_COMP(__NR_rt_sigreturn, sys_rt_sigreturn, compat_sys_rt_sigreturn) | ||
416 | |||
417 | /* kernel/sys.c */ | ||
418 | #define __NR_setpriority 140 | ||
419 | __SYSCALL(__NR_setpriority, sys_setpriority) | ||
420 | #define __NR_getpriority 141 | ||
421 | __SYSCALL(__NR_getpriority, sys_getpriority) | ||
422 | #define __NR_reboot 142 | ||
423 | __SYSCALL(__NR_reboot, sys_reboot) | ||
424 | #define __NR_setregid 143 | ||
425 | __SYSCALL(__NR_setregid, sys_setregid) | ||
426 | #define __NR_setgid 144 | ||
427 | __SYSCALL(__NR_setgid, sys_setgid) | ||
428 | #define __NR_setreuid 145 | ||
429 | __SYSCALL(__NR_setreuid, sys_setreuid) | ||
430 | #define __NR_setuid 146 | ||
431 | __SYSCALL(__NR_setuid, sys_setuid) | ||
432 | #define __NR_setresuid 147 | ||
433 | __SYSCALL(__NR_setresuid, sys_setresuid) | ||
434 | #define __NR_getresuid 148 | ||
435 | __SYSCALL(__NR_getresuid, sys_getresuid) | ||
436 | #define __NR_setresgid 149 | ||
437 | __SYSCALL(__NR_setresgid, sys_setresgid) | ||
438 | #define __NR_getresgid 150 | ||
439 | __SYSCALL(__NR_getresgid, sys_getresgid) | ||
440 | #define __NR_setfsuid 151 | ||
441 | __SYSCALL(__NR_setfsuid, sys_setfsuid) | ||
442 | #define __NR_setfsgid 152 | ||
443 | __SYSCALL(__NR_setfsgid, sys_setfsgid) | ||
444 | #define __NR_times 153 | ||
445 | __SC_COMP(__NR_times, sys_times, compat_sys_times) | ||
446 | #define __NR_setpgid 154 | ||
447 | __SYSCALL(__NR_setpgid, sys_setpgid) | ||
448 | #define __NR_getpgid 155 | ||
449 | __SYSCALL(__NR_getpgid, sys_getpgid) | ||
450 | #define __NR_getsid 156 | ||
451 | __SYSCALL(__NR_getsid, sys_getsid) | ||
452 | #define __NR_setsid 157 | ||
453 | __SYSCALL(__NR_setsid, sys_setsid) | ||
454 | #define __NR_getgroups 158 | ||
455 | __SYSCALL(__NR_getgroups, sys_getgroups) | ||
456 | #define __NR_setgroups 159 | ||
457 | __SYSCALL(__NR_setgroups, sys_setgroups) | ||
458 | #define __NR_uname 160 | ||
459 | __SYSCALL(__NR_uname, sys_newuname) | ||
460 | #define __NR_sethostname 161 | ||
461 | __SYSCALL(__NR_sethostname, sys_sethostname) | ||
462 | #define __NR_setdomainname 162 | ||
463 | __SYSCALL(__NR_setdomainname, sys_setdomainname) | ||
464 | #define __NR_getrlimit 163 | ||
465 | __SC_COMP(__NR_getrlimit, sys_getrlimit, compat_sys_getrlimit) | ||
466 | #define __NR_setrlimit 164 | ||
467 | __SC_COMP(__NR_setrlimit, sys_setrlimit, compat_sys_setrlimit) | ||
468 | #define __NR_getrusage 165 | ||
469 | __SC_COMP(__NR_getrusage, sys_getrusage, compat_sys_getrusage) | ||
470 | #define __NR_umask 166 | ||
471 | __SYSCALL(__NR_umask, sys_umask) | ||
472 | #define __NR_prctl 167 | ||
473 | __SYSCALL(__NR_prctl, sys_prctl) | ||
474 | #define __NR_getcpu 168 | ||
475 | __SYSCALL(__NR_getcpu, sys_getcpu) | ||
476 | |||
477 | /* kernel/time.c */ | ||
478 | #define __NR_gettimeofday 169 | ||
479 | __SC_COMP(__NR_gettimeofday, sys_gettimeofday, compat_sys_gettimeofday) | ||
480 | #define __NR_settimeofday 170 | ||
481 | __SC_COMP(__NR_settimeofday, sys_settimeofday, compat_sys_settimeofday) | ||
482 | #define __NR_adjtimex 171 | ||
483 | __SC_COMP(__NR_adjtimex, sys_adjtimex, compat_sys_adjtimex) | ||
484 | |||
485 | /* kernel/timer.c */ | ||
486 | #define __NR_getpid 172 | ||
487 | __SYSCALL(__NR_getpid, sys_getpid) | ||
488 | #define __NR_getppid 173 | ||
489 | __SYSCALL(__NR_getppid, sys_getppid) | ||
490 | #define __NR_getuid 174 | ||
491 | __SYSCALL(__NR_getuid, sys_getuid) | ||
492 | #define __NR_geteuid 175 | ||
493 | __SYSCALL(__NR_geteuid, sys_geteuid) | ||
494 | #define __NR_getgid 176 | ||
495 | __SYSCALL(__NR_getgid, sys_getgid) | ||
496 | #define __NR_getegid 177 | ||
497 | __SYSCALL(__NR_getegid, sys_getegid) | ||
498 | #define __NR_gettid 178 | ||
499 | __SYSCALL(__NR_gettid, sys_gettid) | ||
500 | #define __NR_sysinfo 179 | ||
501 | __SC_COMP(__NR_sysinfo, sys_sysinfo, compat_sys_sysinfo) | ||
502 | |||
503 | /* ipc/mqueue.c */ | ||
504 | #define __NR_mq_open 180 | ||
505 | __SC_COMP(__NR_mq_open, sys_mq_open, compat_sys_mq_open) | ||
506 | #define __NR_mq_unlink 181 | ||
507 | __SYSCALL(__NR_mq_unlink, sys_mq_unlink) | ||
508 | #define __NR_mq_timedsend 182 | ||
509 | __SC_COMP(__NR_mq_timedsend, sys_mq_timedsend, compat_sys_mq_timedsend) | ||
510 | #define __NR_mq_timedreceive 183 | ||
511 | __SC_COMP(__NR_mq_timedreceive, sys_mq_timedreceive, \ | ||
512 | compat_sys_mq_timedreceive) | ||
513 | #define __NR_mq_notify 184 | ||
514 | __SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify) | ||
515 | #define __NR_mq_getsetattr 185 | ||
516 | __SC_COMP(__NR_mq_getsetattr, sys_mq_getsetattr, compat_sys_mq_getsetattr) | ||
517 | |||
518 | /* ipc/msg.c */ | ||
519 | #define __NR_msgget 186 | ||
520 | __SYSCALL(__NR_msgget, sys_msgget) | ||
521 | #define __NR_msgctl 187 | ||
522 | __SC_COMP(__NR_msgctl, sys_msgctl, compat_sys_msgctl) | ||
523 | #define __NR_msgrcv 188 | ||
524 | __SC_COMP(__NR_msgrcv, sys_msgrcv, compat_sys_msgrcv) | ||
525 | #define __NR_msgsnd 189 | ||
526 | __SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd) | ||
527 | |||
528 | /* ipc/sem.c */ | ||
529 | #define __NR_semget 190 | ||
530 | __SYSCALL(__NR_semget, sys_semget) | ||
531 | #define __NR_semctl 191 | ||
532 | __SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl) | ||
533 | #define __NR_semtimedop 192 | ||
534 | __SC_COMP(__NR_semtimedop, sys_semtimedop, compat_sys_semtimedop) | ||
535 | #define __NR_semop 193 | ||
536 | __SYSCALL(__NR_semop, sys_semop) | ||
537 | |||
538 | /* ipc/shm.c */ | ||
539 | #define __NR_shmget 194 | ||
540 | __SYSCALL(__NR_shmget, sys_shmget) | ||
541 | #define __NR_shmctl 195 | ||
542 | __SC_COMP(__NR_shmctl, sys_shmctl, compat_sys_shmctl) | ||
543 | #define __NR_shmat 196 | ||
544 | __SC_COMP(__NR_shmat, sys_shmat, compat_sys_shmat) | ||
545 | #define __NR_shmdt 197 | ||
546 | __SYSCALL(__NR_shmdt, sys_shmdt) | ||
547 | |||
548 | /* net/socket.c */ | ||
549 | #define __NR_socket 198 | ||
550 | __SYSCALL(__NR_socket, sys_socket) | ||
551 | #define __NR_socketpair 199 | ||
552 | __SYSCALL(__NR_socketpair, sys_socketpair) | ||
553 | #define __NR_bind 200 | ||
554 | __SYSCALL(__NR_bind, sys_bind) | ||
555 | #define __NR_listen 201 | ||
556 | __SYSCALL(__NR_listen, sys_listen) | ||
557 | #define __NR_accept 202 | ||
558 | __SYSCALL(__NR_accept, sys_accept) | ||
559 | #define __NR_connect 203 | ||
560 | __SYSCALL(__NR_connect, sys_connect) | ||
561 | #define __NR_getsockname 204 | ||
562 | __SYSCALL(__NR_getsockname, sys_getsockname) | ||
563 | #define __NR_getpeername 205 | ||
564 | __SYSCALL(__NR_getpeername, sys_getpeername) | ||
565 | #define __NR_sendto 206 | ||
566 | __SYSCALL(__NR_sendto, sys_sendto) | ||
567 | #define __NR_recvfrom 207 | ||
568 | __SC_COMP(__NR_recvfrom, sys_recvfrom, compat_sys_recvfrom) | ||
569 | #define __NR_setsockopt 208 | ||
570 | __SC_COMP(__NR_setsockopt, sys_setsockopt, compat_sys_setsockopt) | ||
571 | #define __NR_getsockopt 209 | ||
572 | __SC_COMP(__NR_getsockopt, sys_getsockopt, compat_sys_getsockopt) | ||
573 | #define __NR_shutdown 210 | ||
574 | __SYSCALL(__NR_shutdown, sys_shutdown) | ||
575 | #define __NR_sendmsg 211 | ||
576 | __SC_COMP(__NR_sendmsg, sys_sendmsg, compat_sys_sendmsg) | ||
577 | #define __NR_recvmsg 212 | ||
578 | __SC_COMP(__NR_recvmsg, sys_recvmsg, compat_sys_recvmsg) | ||
579 | |||
580 | /* mm/filemap.c */ | ||
581 | #define __NR_readahead 213 | ||
582 | __SC_COMP(__NR_readahead, sys_readahead, compat_sys_readahead) | ||
583 | |||
584 | /* mm/nommu.c, also with MMU */ | ||
585 | #define __NR_brk 214 | ||
586 | __SYSCALL(__NR_brk, sys_brk) | ||
587 | #define __NR_munmap 215 | ||
588 | __SYSCALL(__NR_munmap, sys_munmap) | ||
589 | #define __NR_mremap 216 | ||
590 | __SYSCALL(__NR_mremap, sys_mremap) | ||
591 | |||
592 | /* security/keys/keyctl.c */ | ||
593 | #define __NR_add_key 217 | ||
594 | __SYSCALL(__NR_add_key, sys_add_key) | ||
595 | #define __NR_request_key 218 | ||
596 | __SYSCALL(__NR_request_key, sys_request_key) | ||
597 | #define __NR_keyctl 219 | ||
598 | __SC_COMP(__NR_keyctl, sys_keyctl, compat_sys_keyctl) | ||
599 | |||
600 | /* arch/example/kernel/sys_example.c */ | ||
601 | #define __NR_clone 220 | ||
602 | __SYSCALL(__NR_clone, sys_clone) | ||
603 | #define __NR_execve 221 | ||
604 | __SC_COMP(__NR_execve, sys_execve, compat_sys_execve) | ||
605 | |||
606 | #define __NR3264_mmap 222 | ||
607 | __SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap) | ||
608 | /* mm/fadvise.c */ | ||
609 | #define __NR3264_fadvise64 223 | ||
610 | __SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64) | ||
611 | |||
612 | /* mm/, CONFIG_MMU only */ | ||
613 | #ifndef __ARCH_NOMMU | ||
614 | #define __NR_swapon 224 | ||
615 | __SYSCALL(__NR_swapon, sys_swapon) | ||
616 | #define __NR_swapoff 225 | ||
617 | __SYSCALL(__NR_swapoff, sys_swapoff) | ||
618 | #define __NR_mprotect 226 | ||
619 | __SYSCALL(__NR_mprotect, sys_mprotect) | ||
620 | #define __NR_msync 227 | ||
621 | __SYSCALL(__NR_msync, sys_msync) | ||
622 | #define __NR_mlock 228 | ||
623 | __SYSCALL(__NR_mlock, sys_mlock) | ||
624 | #define __NR_munlock 229 | ||
625 | __SYSCALL(__NR_munlock, sys_munlock) | ||
626 | #define __NR_mlockall 230 | ||
627 | __SYSCALL(__NR_mlockall, sys_mlockall) | ||
628 | #define __NR_munlockall 231 | ||
629 | __SYSCALL(__NR_munlockall, sys_munlockall) | ||
630 | #define __NR_mincore 232 | ||
631 | __SYSCALL(__NR_mincore, sys_mincore) | ||
632 | #define __NR_madvise 233 | ||
633 | __SYSCALL(__NR_madvise, sys_madvise) | ||
634 | #define __NR_remap_file_pages 234 | ||
635 | __SYSCALL(__NR_remap_file_pages, sys_remap_file_pages) | ||
636 | #define __NR_mbind 235 | ||
637 | __SC_COMP(__NR_mbind, sys_mbind, compat_sys_mbind) | ||
638 | #define __NR_get_mempolicy 236 | ||
639 | __SC_COMP(__NR_get_mempolicy, sys_get_mempolicy, compat_sys_get_mempolicy) | ||
640 | #define __NR_set_mempolicy 237 | ||
641 | __SC_COMP(__NR_set_mempolicy, sys_set_mempolicy, compat_sys_set_mempolicy) | ||
642 | #define __NR_migrate_pages 238 | ||
643 | __SC_COMP(__NR_migrate_pages, sys_migrate_pages, compat_sys_migrate_pages) | ||
644 | #define __NR_move_pages 239 | ||
645 | __SC_COMP(__NR_move_pages, sys_move_pages, compat_sys_move_pages) | ||
646 | #endif | ||
647 | |||
648 | #define __NR_rt_tgsigqueueinfo 240 | ||
649 | __SC_COMP(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo, \ | ||
650 | compat_sys_rt_tgsigqueueinfo) | ||
651 | #define __NR_perf_event_open 241 | ||
652 | __SYSCALL(__NR_perf_event_open, sys_perf_event_open) | ||
653 | #define __NR_accept4 242 | ||
654 | __SYSCALL(__NR_accept4, sys_accept4) | ||
655 | #define __NR_recvmmsg 243 | ||
656 | __SC_COMP(__NR_recvmmsg, sys_recvmmsg, compat_sys_recvmmsg) | ||
657 | |||
658 | /* | ||
659 | * Architectures may provide up to 16 syscalls of their own | ||
660 | * starting with this value. | ||
661 | */ | ||
662 | #define __NR_arch_specific_syscall 244 | ||
663 | |||
664 | #define __NR_wait4 260 | ||
665 | __SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4) | ||
666 | #define __NR_prlimit64 261 | ||
667 | __SYSCALL(__NR_prlimit64, sys_prlimit64) | ||
668 | #define __NR_fanotify_init 262 | ||
669 | __SYSCALL(__NR_fanotify_init, sys_fanotify_init) | ||
670 | #define __NR_fanotify_mark 263 | ||
671 | __SYSCALL(__NR_fanotify_mark, sys_fanotify_mark) | ||
672 | #define __NR_name_to_handle_at 264 | ||
673 | __SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) | ||
674 | #define __NR_open_by_handle_at 265 | ||
675 | __SC_COMP(__NR_open_by_handle_at, sys_open_by_handle_at, \ | ||
676 | compat_sys_open_by_handle_at) | ||
677 | #define __NR_clock_adjtime 266 | ||
678 | __SC_COMP(__NR_clock_adjtime, sys_clock_adjtime, compat_sys_clock_adjtime) | ||
679 | #define __NR_syncfs 267 | ||
680 | __SYSCALL(__NR_syncfs, sys_syncfs) | ||
681 | #define __NR_setns 268 | ||
682 | __SYSCALL(__NR_setns, sys_setns) | ||
683 | #define __NR_sendmmsg 269 | ||
684 | __SC_COMP(__NR_sendmmsg, sys_sendmmsg, compat_sys_sendmmsg) | ||
685 | #define __NR_process_vm_readv 270 | ||
686 | __SC_COMP(__NR_process_vm_readv, sys_process_vm_readv, \ | ||
687 | compat_sys_process_vm_readv) | ||
688 | #define __NR_process_vm_writev 271 | ||
689 | __SC_COMP(__NR_process_vm_writev, sys_process_vm_writev, \ | ||
690 | compat_sys_process_vm_writev) | ||
691 | #define __NR_kcmp 272 | ||
692 | __SYSCALL(__NR_kcmp, sys_kcmp) | ||
693 | |||
694 | #undef __NR_syscalls | ||
695 | #define __NR_syscalls 273 | ||
696 | |||
697 | /* | ||
698 | * All syscalls below here should go away really, | ||
699 | * these are provided for both review and as a porting | ||
700 | * help for the C library version. | ||
701 | * | ||
702 | * Last chance: are any of these important enough to | ||
703 | * enable by default? | ||
704 | */ | ||
705 | #ifdef __ARCH_WANT_SYSCALL_NO_AT | ||
706 | #define __NR_open 1024 | ||
707 | __SYSCALL(__NR_open, sys_open) | ||
708 | #define __NR_link 1025 | ||
709 | __SYSCALL(__NR_link, sys_link) | ||
710 | #define __NR_unlink 1026 | ||
711 | __SYSCALL(__NR_unlink, sys_unlink) | ||
712 | #define __NR_mknod 1027 | ||
713 | __SYSCALL(__NR_mknod, sys_mknod) | ||
714 | #define __NR_chmod 1028 | ||
715 | __SYSCALL(__NR_chmod, sys_chmod) | ||
716 | #define __NR_chown 1029 | ||
717 | __SYSCALL(__NR_chown, sys_chown) | ||
718 | #define __NR_mkdir 1030 | ||
719 | __SYSCALL(__NR_mkdir, sys_mkdir) | ||
720 | #define __NR_rmdir 1031 | ||
721 | __SYSCALL(__NR_rmdir, sys_rmdir) | ||
722 | #define __NR_lchown 1032 | ||
723 | __SYSCALL(__NR_lchown, sys_lchown) | ||
724 | #define __NR_access 1033 | ||
725 | __SYSCALL(__NR_access, sys_access) | ||
726 | #define __NR_rename 1034 | ||
727 | __SYSCALL(__NR_rename, sys_rename) | ||
728 | #define __NR_readlink 1035 | ||
729 | __SYSCALL(__NR_readlink, sys_readlink) | ||
730 | #define __NR_symlink 1036 | ||
731 | __SYSCALL(__NR_symlink, sys_symlink) | ||
732 | #define __NR_utimes 1037 | ||
733 | __SYSCALL(__NR_utimes, sys_utimes) | ||
734 | #define __NR3264_stat 1038 | ||
735 | __SC_3264(__NR3264_stat, sys_stat64, sys_newstat) | ||
736 | #define __NR3264_lstat 1039 | ||
737 | __SC_3264(__NR3264_lstat, sys_lstat64, sys_newlstat) | ||
738 | |||
739 | #undef __NR_syscalls | ||
740 | #define __NR_syscalls (__NR3264_lstat+1) | ||
741 | #endif /* __ARCH_WANT_SYSCALL_NO_AT */ | ||
742 | |||
743 | #ifdef __ARCH_WANT_SYSCALL_NO_FLAGS | ||
744 | #define __NR_pipe 1040 | ||
745 | __SYSCALL(__NR_pipe, sys_pipe) | ||
746 | #define __NR_dup2 1041 | ||
747 | __SYSCALL(__NR_dup2, sys_dup2) | ||
748 | #define __NR_epoll_create 1042 | ||
749 | __SYSCALL(__NR_epoll_create, sys_epoll_create) | ||
750 | #define __NR_inotify_init 1043 | ||
751 | __SYSCALL(__NR_inotify_init, sys_inotify_init) | ||
752 | #define __NR_eventfd 1044 | ||
753 | __SYSCALL(__NR_eventfd, sys_eventfd) | ||
754 | #define __NR_signalfd 1045 | ||
755 | __SYSCALL(__NR_signalfd, sys_signalfd) | ||
756 | |||
757 | #undef __NR_syscalls | ||
758 | #define __NR_syscalls (__NR_signalfd+1) | ||
759 | #endif /* __ARCH_WANT_SYSCALL_NO_FLAGS */ | ||
760 | |||
761 | #if (__BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT)) && \ | ||
762 | defined(__ARCH_WANT_SYSCALL_OFF_T) | ||
763 | #define __NR_sendfile 1046 | ||
764 | __SYSCALL(__NR_sendfile, sys_sendfile) | ||
765 | #define __NR_ftruncate 1047 | ||
766 | __SYSCALL(__NR_ftruncate, sys_ftruncate) | ||
767 | #define __NR_truncate 1048 | ||
768 | __SYSCALL(__NR_truncate, sys_truncate) | ||
769 | #define __NR_stat 1049 | ||
770 | __SYSCALL(__NR_stat, sys_newstat) | ||
771 | #define __NR_lstat 1050 | ||
772 | __SYSCALL(__NR_lstat, sys_newlstat) | ||
773 | #define __NR_fstat 1051 | ||
774 | __SYSCALL(__NR_fstat, sys_newfstat) | ||
775 | #define __NR_fcntl 1052 | ||
776 | __SYSCALL(__NR_fcntl, sys_fcntl) | ||
777 | #define __NR_fadvise64 1053 | ||
778 | #define __ARCH_WANT_SYS_FADVISE64 | ||
779 | __SYSCALL(__NR_fadvise64, sys_fadvise64) | ||
780 | #define __NR_newfstatat 1054 | ||
781 | #define __ARCH_WANT_SYS_NEWFSTATAT | ||
782 | __SYSCALL(__NR_newfstatat, sys_newfstatat) | ||
783 | #define __NR_fstatfs 1055 | ||
784 | __SYSCALL(__NR_fstatfs, sys_fstatfs) | ||
785 | #define __NR_statfs 1056 | ||
786 | __SYSCALL(__NR_statfs, sys_statfs) | ||
787 | #define __NR_lseek 1057 | ||
788 | __SYSCALL(__NR_lseek, sys_lseek) | ||
789 | #define __NR_mmap 1058 | ||
790 | __SYSCALL(__NR_mmap, sys_mmap) | ||
791 | |||
792 | #undef __NR_syscalls | ||
793 | #define __NR_syscalls (__NR_mmap+1) | ||
794 | #endif /* 32 bit off_t syscalls */ | ||
795 | |||
796 | #ifdef __ARCH_WANT_SYSCALL_DEPRECATED | ||
797 | #define __NR_alarm 1059 | ||
798 | #define __ARCH_WANT_SYS_ALARM | ||
799 | __SYSCALL(__NR_alarm, sys_alarm) | ||
800 | #define __NR_getpgrp 1060 | ||
801 | #define __ARCH_WANT_SYS_GETPGRP | ||
802 | __SYSCALL(__NR_getpgrp, sys_getpgrp) | ||
803 | #define __NR_pause 1061 | ||
804 | #define __ARCH_WANT_SYS_PAUSE | ||
805 | __SYSCALL(__NR_pause, sys_pause) | ||
806 | #define __NR_time 1062 | ||
807 | #define __ARCH_WANT_SYS_TIME | ||
808 | #define __ARCH_WANT_COMPAT_SYS_TIME | ||
809 | __SYSCALL(__NR_time, sys_time) | ||
810 | #define __NR_utime 1063 | ||
811 | #define __ARCH_WANT_SYS_UTIME | ||
812 | __SYSCALL(__NR_utime, sys_utime) | ||
813 | |||
814 | #define __NR_creat 1064 | ||
815 | __SYSCALL(__NR_creat, sys_creat) | ||
816 | #define __NR_getdents 1065 | ||
817 | #define __ARCH_WANT_SYS_GETDENTS | ||
818 | __SYSCALL(__NR_getdents, sys_getdents) | ||
819 | #define __NR_futimesat 1066 | ||
820 | __SYSCALL(__NR_futimesat, sys_futimesat) | ||
821 | #define __NR_select 1067 | ||
822 | #define __ARCH_WANT_SYS_SELECT | ||
823 | __SYSCALL(__NR_select, sys_select) | ||
824 | #define __NR_poll 1068 | ||
825 | __SYSCALL(__NR_poll, sys_poll) | ||
826 | #define __NR_epoll_wait 1069 | ||
827 | __SYSCALL(__NR_epoll_wait, sys_epoll_wait) | ||
828 | #define __NR_ustat 1070 | ||
829 | __SYSCALL(__NR_ustat, sys_ustat) | ||
830 | #define __NR_vfork 1071 | ||
831 | __SYSCALL(__NR_vfork, sys_vfork) | ||
832 | #define __NR_oldwait4 1072 | ||
833 | __SYSCALL(__NR_oldwait4, sys_wait4) | ||
834 | #define __NR_recv 1073 | ||
835 | __SYSCALL(__NR_recv, sys_recv) | ||
836 | #define __NR_send 1074 | ||
837 | __SYSCALL(__NR_send, sys_send) | ||
838 | #define __NR_bdflush 1075 | ||
839 | __SYSCALL(__NR_bdflush, sys_bdflush) | ||
840 | #define __NR_umount 1076 | ||
841 | __SYSCALL(__NR_umount, sys_oldumount) | ||
842 | #define __ARCH_WANT_SYS_OLDUMOUNT | ||
843 | #define __NR_uselib 1077 | ||
844 | __SYSCALL(__NR_uselib, sys_uselib) | ||
845 | #define __NR__sysctl 1078 | ||
846 | __SYSCALL(__NR__sysctl, sys_sysctl) | ||
847 | |||
848 | #define __NR_fork 1079 | ||
849 | #ifdef CONFIG_MMU | ||
850 | __SYSCALL(__NR_fork, sys_fork) | ||
851 | #else | ||
852 | __SYSCALL(__NR_fork, sys_ni_syscall) | ||
853 | #endif /* CONFIG_MMU */ | ||
854 | |||
855 | #undef __NR_syscalls | ||
856 | #define __NR_syscalls (__NR_fork+1) | ||
857 | |||
858 | #endif /* __ARCH_WANT_SYSCALL_DEPRECATED */ | ||
859 | |||
860 | /* | ||
861 | * 32 bit systems traditionally used different | ||
862 | * syscalls for off_t and loff_t arguments, while | ||
863 | * 64 bit systems only need the off_t version. | ||
864 | * For new 32 bit platforms, there is no need to | ||
865 | * implement the old 32 bit off_t syscalls, so | ||
866 | * they take different names. | ||
867 | * Here we map the numbers so that both versions | ||
868 | * use the same syscall table layout. | ||
869 | */ | ||
870 | #if __BITS_PER_LONG == 64 && !defined(__SYSCALL_COMPAT) | ||
871 | #define __NR_fcntl __NR3264_fcntl | ||
872 | #define __NR_statfs __NR3264_statfs | ||
873 | #define __NR_fstatfs __NR3264_fstatfs | ||
874 | #define __NR_truncate __NR3264_truncate | ||
875 | #define __NR_ftruncate __NR3264_ftruncate | ||
876 | #define __NR_lseek __NR3264_lseek | ||
877 | #define __NR_sendfile __NR3264_sendfile | ||
878 | #define __NR_newfstatat __NR3264_fstatat | ||
879 | #define __NR_fstat __NR3264_fstat | ||
880 | #define __NR_mmap __NR3264_mmap | ||
881 | #define __NR_fadvise64 __NR3264_fadvise64 | ||
882 | #ifdef __NR3264_stat | ||
883 | #define __NR_stat __NR3264_stat | ||
884 | #define __NR_lstat __NR3264_lstat | ||
885 | #endif | ||
886 | #else | ||
887 | #define __NR_fcntl64 __NR3264_fcntl | ||
888 | #define __NR_statfs64 __NR3264_statfs | ||
889 | #define __NR_fstatfs64 __NR3264_fstatfs | ||
890 | #define __NR_truncate64 __NR3264_truncate | ||
891 | #define __NR_ftruncate64 __NR3264_ftruncate | ||
892 | #define __NR_llseek __NR3264_lseek | ||
893 | #define __NR_sendfile64 __NR3264_sendfile | ||
894 | #define __NR_fstatat64 __NR3264_fstatat | ||
895 | #define __NR_fstat64 __NR3264_fstat | ||
896 | #define __NR_mmap2 __NR3264_mmap | ||
897 | #define __NR_fadvise64_64 __NR3264_fadvise64 | ||
898 | #ifdef __NR3264_stat | ||
899 | #define __NR_stat64 __NR3264_stat | ||
900 | #define __NR_lstat64 __NR3264_lstat | ||
901 | #endif | ||
902 | #endif | ||