aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/uapi
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/include/uapi')
-rw-r--r--arch/mips/include/uapi/asm/Kbuild34
-rw-r--r--arch/mips/include/uapi/asm/auxvec.h4
-rw-r--r--arch/mips/include/uapi/asm/bitsperlong.h8
-rw-r--r--arch/mips/include/uapi/asm/byteorder.h19
-rw-r--r--arch/mips/include/uapi/asm/cachectl.h26
-rw-r--r--arch/mips/include/uapi/asm/errno.h129
-rw-r--r--arch/mips/include/uapi/asm/fcntl.h77
-rw-r--r--arch/mips/include/uapi/asm/ioctl.h27
-rw-r--r--arch/mips/include/uapi/asm/ioctls.h110
-rw-r--r--arch/mips/include/uapi/asm/ipcbuf.h1
-rw-r--r--arch/mips/include/uapi/asm/kvm_para.h1
-rw-r--r--arch/mips/include/uapi/asm/mman.h90
-rw-r--r--arch/mips/include/uapi/asm/msgbuf.h47
-rw-r--r--arch/mips/include/uapi/asm/param.h16
-rw-r--r--arch/mips/include/uapi/asm/poll.h9
-rw-r--r--arch/mips/include/uapi/asm/posix_types.h32
-rw-r--r--arch/mips/include/uapi/asm/ptrace.h116
-rw-r--r--arch/mips/include/uapi/asm/resource.h35
-rw-r--r--arch/mips/include/uapi/asm/sembuf.h22
-rw-r--r--arch/mips/include/uapi/asm/setup.h7
-rw-r--r--arch/mips/include/uapi/asm/sgidefs.h44
-rw-r--r--arch/mips/include/uapi/asm/shmbuf.h38
-rw-r--r--arch/mips/include/uapi/asm/sigcontext.h78
-rw-r--r--arch/mips/include/uapi/asm/siginfo.h114
-rw-r--r--arch/mips/include/uapi/asm/signal.h123
-rw-r--r--arch/mips/include/uapi/asm/socket.h93
-rw-r--r--arch/mips/include/uapi/asm/sockios.h26
-rw-r--r--arch/mips/include/uapi/asm/stat.h132
-rw-r--r--arch/mips/include/uapi/asm/statfs.h100
-rw-r--r--arch/mips/include/uapi/asm/swab.h59
-rw-r--r--arch/mips/include/uapi/asm/sysmips.h25
-rw-r--r--arch/mips/include/uapi/asm/termbits.h227
-rw-r--r--arch/mips/include/uapi/asm/termios.h80
-rw-r--r--arch/mips/include/uapi/asm/types.h27
-rw-r--r--arch/mips/include/uapi/asm/unistd.h1035
35 files changed, 3011 insertions, 0 deletions
diff --git a/arch/mips/include/uapi/asm/Kbuild b/arch/mips/include/uapi/asm/Kbuild
index baebb3da1d4..a1a0452ac18 100644
--- a/arch/mips/include/uapi/asm/Kbuild
+++ b/arch/mips/include/uapi/asm/Kbuild
@@ -1,3 +1,37 @@
1# UAPI Header export list 1# UAPI Header export list
2include include/uapi/asm-generic/Kbuild.asm 2include include/uapi/asm-generic/Kbuild.asm
3 3
4header-y += auxvec.h
5header-y += bitsperlong.h
6header-y += byteorder.h
7header-y += cachectl.h
8header-y += errno.h
9header-y += fcntl.h
10header-y += ioctl.h
11header-y += ioctls.h
12header-y += ipcbuf.h
13header-y += kvm_para.h
14header-y += mman.h
15header-y += msgbuf.h
16header-y += param.h
17header-y += poll.h
18header-y += posix_types.h
19header-y += ptrace.h
20header-y += resource.h
21header-y += sembuf.h
22header-y += setup.h
23header-y += sgidefs.h
24header-y += shmbuf.h
25header-y += sigcontext.h
26header-y += siginfo.h
27header-y += signal.h
28header-y += socket.h
29header-y += sockios.h
30header-y += stat.h
31header-y += statfs.h
32header-y += swab.h
33header-y += sysmips.h
34header-y += termbits.h
35header-y += termios.h
36header-y += types.h
37header-y += unistd.h
diff --git a/arch/mips/include/uapi/asm/auxvec.h b/arch/mips/include/uapi/asm/auxvec.h
new file mode 100644
index 00000000000..7cf7f2d2194
--- /dev/null
+++ b/arch/mips/include/uapi/asm/auxvec.h
@@ -0,0 +1,4 @@
1#ifndef _ASM_AUXVEC_H
2#define _ASM_AUXVEC_H
3
4#endif /* _ASM_AUXVEC_H */
diff --git a/arch/mips/include/uapi/asm/bitsperlong.h b/arch/mips/include/uapi/asm/bitsperlong.h
new file mode 100644
index 00000000000..3e4c10a8e78
--- /dev/null
+++ b/arch/mips/include/uapi/asm/bitsperlong.h
@@ -0,0 +1,8 @@
1#ifndef __ASM_MIPS_BITSPERLONG_H
2#define __ASM_MIPS_BITSPERLONG_H
3
4#define __BITS_PER_LONG _MIPS_SZLONG
5
6#include <asm-generic/bitsperlong.h>
7
8#endif /* __ASM_MIPS_BITSPERLONG_H */
diff --git a/arch/mips/include/uapi/asm/byteorder.h b/arch/mips/include/uapi/asm/byteorder.h
new file mode 100644
index 00000000000..9579051ff1c
--- /dev/null
+++ b/arch/mips/include/uapi/asm/byteorder.h
@@ -0,0 +1,19 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1996, 99, 2003 by Ralf Baechle
7 */
8#ifndef _ASM_BYTEORDER_H
9#define _ASM_BYTEORDER_H
10
11#if defined(__MIPSEB__)
12#include <linux/byteorder/big_endian.h>
13#elif defined(__MIPSEL__)
14#include <linux/byteorder/little_endian.h>
15#else
16# error "MIPS, but neither __MIPSEB__, nor __MIPSEL__???"
17#endif
18
19#endif /* _ASM_BYTEORDER_H */
diff --git a/arch/mips/include/uapi/asm/cachectl.h b/arch/mips/include/uapi/asm/cachectl.h
new file mode 100644
index 00000000000..f3ce721861d
--- /dev/null
+++ b/arch/mips/include/uapi/asm/cachectl.h
@@ -0,0 +1,26 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1994, 1995, 1996 by Ralf Baechle
7 */
8#ifndef _ASM_CACHECTL
9#define _ASM_CACHECTL
10
11/*
12 * Options for cacheflush system call
13 */
14#define ICACHE (1<<0) /* flush instruction cache */
15#define DCACHE (1<<1) /* writeback and flush data cache */
16#define BCACHE (ICACHE|DCACHE) /* flush both caches */
17
18/*
19 * Caching modes for the cachectl(2) call
20 *
21 * cachectl(2) is currently not supported and returns ENOSYS.
22 */
23#define CACHEABLE 0 /* make pages cacheable */
24#define UNCACHEABLE 1 /* make pages uncacheable */
25
26#endif /* _ASM_CACHECTL */
diff --git a/arch/mips/include/uapi/asm/errno.h b/arch/mips/include/uapi/asm/errno.h
new file mode 100644
index 00000000000..bd67b15042e
--- /dev/null
+++ b/arch/mips/include/uapi/asm/errno.h
@@ -0,0 +1,129 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1995, 1999, 2001, 2002 by Ralf Baechle
7 */
8#ifndef _UAPI_ASM_ERRNO_H
9#define _UAPI_ASM_ERRNO_H
10
11/*
12 * These error numbers are intended to be MIPS ABI compatible
13 */
14
15#include <asm-generic/errno-base.h>
16
17#define ENOMSG 35 /* No message of desired type */
18#define EIDRM 36 /* Identifier removed */
19#define ECHRNG 37 /* Channel number out of range */
20#define EL2NSYNC 38 /* Level 2 not synchronized */
21#define EL3HLT 39 /* Level 3 halted */
22#define EL3RST 40 /* Level 3 reset */
23#define ELNRNG 41 /* Link number out of range */
24#define EUNATCH 42 /* Protocol driver not attached */
25#define ENOCSI 43 /* No CSI structure available */
26#define EL2HLT 44 /* Level 2 halted */
27#define EDEADLK 45 /* Resource deadlock would occur */
28#define ENOLCK 46 /* No record locks available */
29#define EBADE 50 /* Invalid exchange */
30#define EBADR 51 /* Invalid request descriptor */
31#define EXFULL 52 /* Exchange full */
32#define ENOANO 53 /* No anode */
33#define EBADRQC 54 /* Invalid request code */
34#define EBADSLT 55 /* Invalid slot */
35#define EDEADLOCK 56 /* File locking deadlock error */
36#define EBFONT 59 /* Bad font file format */
37#define ENOSTR 60 /* Device not a stream */
38#define ENODATA 61 /* No data available */
39#define ETIME 62 /* Timer expired */
40#define ENOSR 63 /* Out of streams resources */
41#define ENONET 64 /* Machine is not on the network */
42#define ENOPKG 65 /* Package not installed */
43#define EREMOTE 66 /* Object is remote */
44#define ENOLINK 67 /* Link has been severed */
45#define EADV 68 /* Advertise error */
46#define ESRMNT 69 /* Srmount error */
47#define ECOMM 70 /* Communication error on send */
48#define EPROTO 71 /* Protocol error */
49#define EDOTDOT 73 /* RFS specific error */
50#define EMULTIHOP 74 /* Multihop attempted */
51#define EBADMSG 77 /* Not a data message */
52#define ENAMETOOLONG 78 /* File name too long */
53#define EOVERFLOW 79 /* Value too large for defined data type */
54#define ENOTUNIQ 80 /* Name not unique on network */
55#define EBADFD 81 /* File descriptor in bad state */
56#define EREMCHG 82 /* Remote address changed */
57#define ELIBACC 83 /* Can not access a needed shared library */
58#define ELIBBAD 84 /* Accessing a corrupted shared library */
59#define ELIBSCN 85 /* .lib section in a.out corrupted */
60#define ELIBMAX 86 /* Attempting to link in too many shared libraries */
61#define ELIBEXEC 87 /* Cannot exec a shared library directly */
62#define EILSEQ 88 /* Illegal byte sequence */
63#define ENOSYS 89 /* Function not implemented */
64#define ELOOP 90 /* Too many symbolic links encountered */
65#define ERESTART 91 /* Interrupted system call should be restarted */
66#define ESTRPIPE 92 /* Streams pipe error */
67#define ENOTEMPTY 93 /* Directory not empty */
68#define EUSERS 94 /* Too many users */
69#define ENOTSOCK 95 /* Socket operation on non-socket */
70#define EDESTADDRREQ 96 /* Destination address required */
71#define EMSGSIZE 97 /* Message too long */
72#define EPROTOTYPE 98 /* Protocol wrong type for socket */
73#define ENOPROTOOPT 99 /* Protocol not available */
74#define EPROTONOSUPPORT 120 /* Protocol not supported */
75#define ESOCKTNOSUPPORT 121 /* Socket type not supported */
76#define EOPNOTSUPP 122 /* Operation not supported on transport endpoint */
77#define EPFNOSUPPORT 123 /* Protocol family not supported */
78#define EAFNOSUPPORT 124 /* Address family not supported by protocol */
79#define EADDRINUSE 125 /* Address already in use */
80#define EADDRNOTAVAIL 126 /* Cannot assign requested address */
81#define ENETDOWN 127 /* Network is down */
82#define ENETUNREACH 128 /* Network is unreachable */
83#define ENETRESET 129 /* Network dropped connection because of reset */
84#define ECONNABORTED 130 /* Software caused connection abort */
85#define ECONNRESET 131 /* Connection reset by peer */
86#define ENOBUFS 132 /* No buffer space available */
87#define EISCONN 133 /* Transport endpoint is already connected */
88#define ENOTCONN 134 /* Transport endpoint is not connected */
89#define EUCLEAN 135 /* Structure needs cleaning */
90#define ENOTNAM 137 /* Not a XENIX named type file */
91#define ENAVAIL 138 /* No XENIX semaphores available */
92#define EISNAM 139 /* Is a named type file */
93#define EREMOTEIO 140 /* Remote I/O error */
94#define EINIT 141 /* Reserved */
95#define EREMDEV 142 /* Error 142 */
96#define ESHUTDOWN 143 /* Cannot send after transport endpoint shutdown */
97#define ETOOMANYREFS 144 /* Too many references: cannot splice */
98#define ETIMEDOUT 145 /* Connection timed out */
99#define ECONNREFUSED 146 /* Connection refused */
100#define EHOSTDOWN 147 /* Host is down */
101#define EHOSTUNREACH 148 /* No route to host */
102#define EWOULDBLOCK EAGAIN /* Operation would block */
103#define EALREADY 149 /* Operation already in progress */
104#define EINPROGRESS 150 /* Operation now in progress */
105#define ESTALE 151 /* Stale NFS file handle */
106#define ECANCELED 158 /* AIO operation canceled */
107
108/*
109 * These error are Linux extensions.
110 */
111#define ENOMEDIUM 159 /* No medium found */
112#define EMEDIUMTYPE 160 /* Wrong medium type */
113#define ENOKEY 161 /* Required key not available */
114#define EKEYEXPIRED 162 /* Key has expired */
115#define EKEYREVOKED 163 /* Key has been revoked */
116#define EKEYREJECTED 164 /* Key was rejected by service */
117
118/* for robust mutexes */
119#define EOWNERDEAD 165 /* Owner died */
120#define ENOTRECOVERABLE 166 /* State not recoverable */
121
122#define ERFKILL 167 /* Operation not possible due to RF-kill */
123
124#define EHWPOISON 168 /* Memory page has hardware error */
125
126#define EDQUOT 1133 /* Quota exceeded */
127
128
129#endif /* _UAPI_ASM_ERRNO_H */
diff --git a/arch/mips/include/uapi/asm/fcntl.h b/arch/mips/include/uapi/asm/fcntl.h
new file mode 100644
index 00000000000..75eddedcfc3
--- /dev/null
+++ b/arch/mips/include/uapi/asm/fcntl.h
@@ -0,0 +1,77 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1995, 96, 97, 98, 99, 2003, 05 Ralf Baechle
7 */
8#ifndef _ASM_FCNTL_H
9#define _ASM_FCNTL_H
10
11
12#define O_APPEND 0x0008
13#define O_DSYNC 0x0010 /* used to be O_SYNC, see below */
14#define O_NONBLOCK 0x0080
15#define O_CREAT 0x0100 /* not fcntl */
16#define O_TRUNC 0x0200 /* not fcntl */
17#define O_EXCL 0x0400 /* not fcntl */
18#define O_NOCTTY 0x0800 /* not fcntl */
19#define FASYNC 0x1000 /* fcntl, for BSD compatibility */
20#define O_LARGEFILE 0x2000 /* allow large file opens */
21/*
22 * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using
23 * the O_SYNC flag. We continue to use the existing numerical value
24 * for O_DSYNC semantics now, but using the correct symbolic name for it.
25 * This new value is used to request true Posix O_SYNC semantics. It is
26 * defined in this strange way to make sure applications compiled against
27 * new headers get at least O_DSYNC semantics on older kernels.
28 *
29 * This has the nice side-effect that we can simply test for O_DSYNC
30 * wherever we do not care if O_DSYNC or O_SYNC is used.
31 *
32 * Note: __O_SYNC must never be used directly.
33 */
34#define __O_SYNC 0x4000
35#define O_SYNC (__O_SYNC|O_DSYNC)
36#define O_DIRECT 0x8000 /* direct disk access hint */
37
38#define F_GETLK 14
39#define F_SETLK 6
40#define F_SETLKW 7
41
42#define F_SETOWN 24 /* for sockets. */
43#define F_GETOWN 23 /* for sockets. */
44
45#ifndef __mips64
46#define F_GETLK64 33 /* using 'struct flock64' */
47#define F_SETLK64 34
48#define F_SETLKW64 35
49#endif
50
51/*
52 * The flavours of struct flock. "struct flock" is the ABI compliant
53 * variant. Finally struct flock64 is the LFS variant of struct flock. As
54 * a historic accident and inconsistence with the ABI definition it doesn't
55 * contain all the same fields as struct flock.
56 */
57
58#ifdef CONFIG_32BIT
59#include <linux/types.h>
60
61struct flock {
62 short l_type;
63 short l_whence;
64 off_t l_start;
65 off_t l_len;
66 long l_sysid;
67 __kernel_pid_t l_pid;
68 long pad[4];
69};
70
71#define HAVE_ARCH_STRUCT_FLOCK
72
73#endif /* CONFIG_32BIT */
74
75#include <asm-generic/fcntl.h>
76
77#endif /* _ASM_FCNTL_H */
diff --git a/arch/mips/include/uapi/asm/ioctl.h b/arch/mips/include/uapi/asm/ioctl.h
new file mode 100644
index 00000000000..c515a1a4c47
--- /dev/null
+++ b/arch/mips/include/uapi/asm/ioctl.h
@@ -0,0 +1,27 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1995, 96, 99, 2001 Ralf Baechle <ralf@linux-mips.org>
7 * Copyright (C) 2009 Wind River Systems
8 * Written by Ralf Baechle <ralf@linux-mips.org>
9 */
10#ifndef __ASM_IOCTL_H
11#define __ASM_IOCTL_H
12
13#define _IOC_SIZEBITS 13
14#define _IOC_DIRBITS 3
15
16/*
17 * Direction bits _IOC_NONE could be 0, but OSF/1 gives it a bit.
18 * And this turns out useful to catch old ioctl numbers in header
19 * files for us.
20 */
21#define _IOC_NONE 1U
22#define _IOC_READ 2U
23#define _IOC_WRITE 4U
24
25#include <asm-generic/ioctl.h>
26
27#endif /* __ASM_IOCTL_H */
diff --git a/arch/mips/include/uapi/asm/ioctls.h b/arch/mips/include/uapi/asm/ioctls.h
new file mode 100644
index 00000000000..92403c3d600
--- /dev/null
+++ b/arch/mips/include/uapi/asm/ioctls.h
@@ -0,0 +1,110 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1995, 1996, 2001 Ralf Baechle
7 * Copyright (C) 2001 MIPS Technologies, Inc.
8 */
9#ifndef __ASM_IOCTLS_H
10#define __ASM_IOCTLS_H
11
12#include <asm/ioctl.h>
13
14#define TCGETA 0x5401
15#define TCSETA 0x5402 /* Clashes with SNDCTL_TMR_START sound ioctl */
16#define TCSETAW 0x5403
17#define TCSETAF 0x5404
18
19#define TCSBRK 0x5405
20#define TCXONC 0x5406
21#define TCFLSH 0x5407
22
23#define TCGETS 0x540d
24#define TCSETS 0x540e
25#define TCSETSW 0x540f
26#define TCSETSF 0x5410
27
28#define TIOCEXCL 0x740d /* set exclusive use of tty */
29#define TIOCNXCL 0x740e /* reset exclusive use of tty */
30#define TIOCOUTQ 0x7472 /* output queue size */
31#define TIOCSTI 0x5472 /* simulate terminal input */
32#define TIOCMGET 0x741d /* get all modem bits */
33#define TIOCMBIS 0x741b /* bis modem bits */
34#define TIOCMBIC 0x741c /* bic modem bits */
35#define TIOCMSET 0x741a /* set all modem bits */
36#define TIOCPKT 0x5470 /* pty: set/clear packet mode */
37#define TIOCPKT_DATA 0x00 /* data packet */
38#define TIOCPKT_FLUSHREAD 0x01 /* flush packet */
39#define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */
40#define TIOCPKT_STOP 0x04 /* stop output */
41#define TIOCPKT_START 0x08 /* start output */
42#define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */
43#define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */
44#define TIOCPKT_IOCTL 0x40 /* state change of pty driver */
45#define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */
46#define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */
47#define TIOCNOTTY 0x5471 /* void tty association */
48#define TIOCSETD 0x7401
49#define TIOCGETD 0x7400
50
51#define FIOCLEX 0x6601
52#define FIONCLEX 0x6602
53#define FIOASYNC 0x667d
54#define FIONBIO 0x667e
55#define FIOQSIZE 0x667f
56
57#define TIOCGLTC 0x7474 /* get special local chars */
58#define TIOCSLTC 0x7475 /* set special local chars */
59#define TIOCSPGRP _IOW('t', 118, int) /* set pgrp of tty */
60#define TIOCGPGRP _IOR('t', 119, int) /* get pgrp of tty */
61#define TIOCCONS _IOW('t', 120, int) /* become virtual console */
62
63#define FIONREAD 0x467f
64#define TIOCINQ FIONREAD
65
66#define TIOCGETP 0x7408
67#define TIOCSETP 0x7409
68#define TIOCSETN 0x740a /* TIOCSETP wo flush */
69
70/* #define TIOCSETA _IOW('t', 20, struct termios) set termios struct */
71/* #define TIOCSETAW _IOW('t', 21, struct termios) drain output, set */
72/* #define TIOCSETAF _IOW('t', 22, struct termios) drn out, fls in, set */
73/* #define TIOCGETD _IOR('t', 26, int) get line discipline */
74/* #define TIOCSETD _IOW('t', 27, int) set line discipline */
75 /* 127-124 compat */
76
77#define TIOCSBRK 0x5427 /* BSD compatibility */
78#define TIOCCBRK 0x5428 /* BSD compatibility */
79#define TIOCGSID 0x7416 /* Return the session ID of FD */
80#define TCGETS2 _IOR('T', 0x2A, struct termios2)
81#define TCSETS2 _IOW('T', 0x2B, struct termios2)
82#define TCSETSW2 _IOW('T', 0x2C, struct termios2)
83#define TCSETSF2 _IOW('T', 0x2D, struct termios2)
84#define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
85#define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */
86#define TIOCGDEV _IOR('T', 0x32, unsigned int) /* Get primary device node of /dev/console */
87#define TIOCSIG _IOW('T', 0x36, int) /* Generate signal on Pty slave */
88#define TIOCVHANGUP 0x5437
89
90/* I hope the range from 0x5480 on is free ... */
91#define TIOCSCTTY 0x5480 /* become controlling tty */
92#define TIOCGSOFTCAR 0x5481
93#define TIOCSSOFTCAR 0x5482
94#define TIOCLINUX 0x5483
95#define TIOCGSERIAL 0x5484
96#define TIOCSSERIAL 0x5485
97#define TCSBRKP 0x5486 /* Needed for POSIX tcsendbreak() */
98#define TIOCSERCONFIG 0x5488
99#define TIOCSERGWILD 0x5489
100#define TIOCSERSWILD 0x548a
101#define TIOCGLCKTRMIOS 0x548b
102#define TIOCSLCKTRMIOS 0x548c
103#define TIOCSERGSTRUCT 0x548d /* For debugging only */
104#define TIOCSERGETLSR 0x548e /* Get line status register */
105#define TIOCSERGETMULTI 0x548f /* Get multiport config */
106#define TIOCSERSETMULTI 0x5490 /* Set multiport config */
107#define TIOCMIWAIT 0x5491 /* wait for a change on serial input line(s) */
108#define TIOCGICOUNT 0x5492 /* read serial port inline interrupt counts */
109
110#endif /* __ASM_IOCTLS_H */
diff --git a/arch/mips/include/uapi/asm/ipcbuf.h b/arch/mips/include/uapi/asm/ipcbuf.h
new file mode 100644
index 00000000000..84c7e51cb6d
--- /dev/null
+++ b/arch/mips/include/uapi/asm/ipcbuf.h
@@ -0,0 +1 @@
#include <asm-generic/ipcbuf.h>
diff --git a/arch/mips/include/uapi/asm/kvm_para.h b/arch/mips/include/uapi/asm/kvm_para.h
new file mode 100644
index 00000000000..14fab8f0b95
--- /dev/null
+++ b/arch/mips/include/uapi/asm/kvm_para.h
@@ -0,0 +1 @@
#include <asm-generic/kvm_para.h>
diff --git a/arch/mips/include/uapi/asm/mman.h b/arch/mips/include/uapi/asm/mman.h
new file mode 100644
index 00000000000..46d3da0d4b9
--- /dev/null
+++ b/arch/mips/include/uapi/asm/mman.h
@@ -0,0 +1,90 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1995, 1999, 2002 by Ralf Baechle
7 */
8#ifndef _ASM_MMAN_H
9#define _ASM_MMAN_H
10
11/*
12 * Protections are chosen from these bits, OR'd together. The
13 * implementation does not necessarily support PROT_EXEC or PROT_WRITE
14 * without PROT_READ. The only guarantees are that no writing will be
15 * allowed without PROT_WRITE and no access will be allowed for PROT_NONE.
16 */
17#define PROT_NONE 0x00 /* page can not be accessed */
18#define PROT_READ 0x01 /* page can be read */
19#define PROT_WRITE 0x02 /* page can be written */
20#define PROT_EXEC 0x04 /* page can be executed */
21/* 0x08 reserved for PROT_EXEC_NOFLUSH */
22#define PROT_SEM 0x10 /* page may be used for atomic ops */
23#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
24#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
25
26/*
27 * Flags for mmap
28 */
29#define MAP_SHARED 0x001 /* Share changes */
30#define MAP_PRIVATE 0x002 /* Changes are private */
31#define MAP_TYPE 0x00f /* Mask for type of mapping */
32#define MAP_FIXED 0x010 /* Interpret addr exactly */
33
34/* not used by linux, but here to make sure we don't clash with ABI defines */
35#define MAP_RENAME 0x020 /* Assign page to file */
36#define MAP_AUTOGROW 0x040 /* File may grow by writing */
37#define MAP_LOCAL 0x080 /* Copy on fork/sproc */
38#define MAP_AUTORSRV 0x100 /* Logical swap reserved on demand */
39
40/* These are linux-specific */
41#define MAP_NORESERVE 0x0400 /* don't check for reservations */
42#define MAP_ANONYMOUS 0x0800 /* don't use a file */
43#define MAP_GROWSDOWN 0x1000 /* stack-like segment */
44#define MAP_DENYWRITE 0x2000 /* ETXTBSY */
45#define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
46#define MAP_LOCKED 0x8000 /* pages are locked */
47#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
48#define MAP_NONBLOCK 0x20000 /* do not block on IO */
49#define MAP_STACK 0x40000 /* give out an address that is best suited for process/thread stacks */
50#define MAP_HUGETLB 0x80000 /* create a huge page mapping */
51
52/*
53 * Flags for msync
54 */
55#define MS_ASYNC 0x0001 /* sync memory asynchronously */
56#define MS_INVALIDATE 0x0002 /* invalidate mappings & caches */
57#define MS_SYNC 0x0004 /* synchronous memory sync */
58
59/*
60 * Flags for mlockall
61 */
62#define MCL_CURRENT 1 /* lock all current mappings */
63#define MCL_FUTURE 2 /* lock all future mappings */
64
65#define MADV_NORMAL 0 /* no further special treatment */
66#define MADV_RANDOM 1 /* expect random page references */
67#define MADV_SEQUENTIAL 2 /* expect sequential page references */
68#define MADV_WILLNEED 3 /* will need these pages */
69#define MADV_DONTNEED 4 /* don't need these pages */
70
71/* common parameters: try to keep these consistent across architectures */
72#define MADV_REMOVE 9 /* remove these pages & resources */
73#define MADV_DONTFORK 10 /* don't inherit across fork */
74#define MADV_DOFORK 11 /* do inherit across fork */
75
76#define MADV_MERGEABLE 12 /* KSM may merge identical pages */
77#define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */
78#define MADV_HWPOISON 100 /* poison a page for testing */
79
80#define MADV_HUGEPAGE 14 /* Worth backing with hugepages */
81#define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages */
82
83#define MADV_DONTDUMP 16 /* Explicity exclude from the core dump,
84 overrides the coredump filter bits */
85#define MADV_DODUMP 17 /* Clear the MADV_NODUMP flag */
86
87/* compatibility flags */
88#define MAP_FILE 0
89
90#endif /* _ASM_MMAN_H */
diff --git a/arch/mips/include/uapi/asm/msgbuf.h b/arch/mips/include/uapi/asm/msgbuf.h
new file mode 100644
index 00000000000..0d6c7f14de3
--- /dev/null
+++ b/arch/mips/include/uapi/asm/msgbuf.h
@@ -0,0 +1,47 @@
1#ifndef _ASM_MSGBUF_H
2#define _ASM_MSGBUF_H
3
4
5/*
6 * The msqid64_ds structure for the MIPS architecture.
7 * Note extra padding because this structure is passed back and forth
8 * between kernel and user space.
9 *
10 * Pad space is left for:
11 * - extension of time_t to 64-bit on 32-bitsystem to solve the y2038 problem
12 * - 2 miscellaneous unsigned long values
13 */
14
15struct msqid64_ds {
16 struct ipc64_perm msg_perm;
17#if defined(CONFIG_32BIT) && !defined(CONFIG_CPU_LITTLE_ENDIAN)
18 unsigned long __unused1;
19#endif
20 __kernel_time_t msg_stime; /* last msgsnd time */
21#if defined(CONFIG_32BIT) && defined(CONFIG_CPU_LITTLE_ENDIAN)
22 unsigned long __unused1;
23#endif
24#if defined(CONFIG_32BIT) && !defined(CONFIG_CPU_LITTLE_ENDIAN)
25 unsigned long __unused2;
26#endif
27 __kernel_time_t msg_rtime; /* last msgrcv time */
28#if defined(CONFIG_32BIT) && defined(CONFIG_CPU_LITTLE_ENDIAN)
29 unsigned long __unused2;
30#endif
31#if defined(CONFIG_32BIT) && !defined(CONFIG_CPU_LITTLE_ENDIAN)
32 unsigned long __unused3;
33#endif
34 __kernel_time_t msg_ctime; /* last change time */
35#if defined(CONFIG_32BIT) && defined(CONFIG_CPU_LITTLE_ENDIAN)
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_MSGBUF_H */
diff --git a/arch/mips/include/uapi/asm/param.h b/arch/mips/include/uapi/asm/param.h
new file mode 100644
index 00000000000..da3920fce9a
--- /dev/null
+++ b/arch/mips/include/uapi/asm/param.h
@@ -0,0 +1,16 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright 1994 - 2000, 2002 Ralf Baechle (ralf@gnu.org)
7 * Copyright 2000 Silicon Graphics, Inc.
8 */
9#ifndef _ASM_PARAM_H
10#define _ASM_PARAM_H
11
12#define EXEC_PAGESIZE 65536
13
14#include <asm-generic/param.h>
15
16#endif /* _ASM_PARAM_H */
diff --git a/arch/mips/include/uapi/asm/poll.h b/arch/mips/include/uapi/asm/poll.h
new file mode 100644
index 00000000000..47b95208043
--- /dev/null
+++ b/arch/mips/include/uapi/asm/poll.h
@@ -0,0 +1,9 @@
1#ifndef __ASM_POLL_H
2#define __ASM_POLL_H
3
4#define POLLWRNORM POLLOUT
5#define POLLWRBAND 0x0100
6
7#include <asm-generic/poll.h>
8
9#endif /* __ASM_POLL_H */
diff --git a/arch/mips/include/uapi/asm/posix_types.h b/arch/mips/include/uapi/asm/posix_types.h
new file mode 100644
index 00000000000..fa03ec3fbf8
--- /dev/null
+++ b/arch/mips/include/uapi/asm/posix_types.h
@@ -0,0 +1,32 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1996, 97, 98, 99, 2000 by Ralf Baechle
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 */
9#ifndef _ASM_POSIX_TYPES_H
10#define _ASM_POSIX_TYPES_H
11
12#include <asm/sgidefs.h>
13
14/*
15 * This file is generally used by user-level software, so you need to
16 * be a little careful about namespace pollution etc. Also, we cannot
17 * assume GCC is being used.
18 */
19
20typedef long __kernel_daddr_t;
21#define __kernel_daddr_t __kernel_daddr_t
22
23#if (_MIPS_SZLONG == 32)
24typedef struct {
25 long val[2];
26} __kernel_fsid_t;
27#define __kernel_fsid_t __kernel_fsid_t
28#endif
29
30#include <asm-generic/posix_types.h>
31
32#endif /* _ASM_POSIX_TYPES_H */
diff --git a/arch/mips/include/uapi/asm/ptrace.h b/arch/mips/include/uapi/asm/ptrace.h
new file mode 100644
index 00000000000..1bc1f52f40d
--- /dev/null
+++ b/arch/mips/include/uapi/asm/ptrace.h
@@ -0,0 +1,116 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 by Ralf Baechle
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 */
9#ifndef _UAPI_ASM_PTRACE_H
10#define _UAPI_ASM_PTRACE_H
11
12/* 0 - 31 are integer registers, 32 - 63 are fp registers. */
13#define FPR_BASE 32
14#define PC 64
15#define CAUSE 65
16#define BADVADDR 66
17#define MMHI 67
18#define MMLO 68
19#define FPC_CSR 69
20#define FPC_EIR 70
21#define DSP_BASE 71 /* 3 more hi / lo register pairs */
22#define DSP_CONTROL 77
23#define ACX 78
24
25/*
26 * This struct defines the way the registers are stored on the stack during a
27 * system call/exception. As usual the registers k0/k1 aren't being saved.
28 */
29struct pt_regs {
30#ifdef CONFIG_32BIT
31 /* Pad bytes for argument save space on the stack. */
32 unsigned long pad0[6];
33#endif
34
35 /* Saved main processor registers. */
36 unsigned long regs[32];
37
38 /* Saved special registers. */
39 unsigned long cp0_status;
40 unsigned long hi;
41 unsigned long lo;
42#ifdef CONFIG_CPU_HAS_SMARTMIPS
43 unsigned long acx;
44#endif
45 unsigned long cp0_badvaddr;
46 unsigned long cp0_cause;
47 unsigned long cp0_epc;
48#ifdef CONFIG_MIPS_MT_SMTC
49 unsigned long cp0_tcstatus;
50#endif /* CONFIG_MIPS_MT_SMTC */
51#ifdef CONFIG_CPU_CAVIUM_OCTEON
52 unsigned long long mpl[3]; /* MTM{0,1,2} */
53 unsigned long long mtp[3]; /* MTP{0,1,2} */
54#endif
55} __attribute__ ((aligned (8)));
56
57/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
58#define PTRACE_GETREGS 12
59#define PTRACE_SETREGS 13
60#define PTRACE_GETFPREGS 14
61#define PTRACE_SETFPREGS 15
62/* #define PTRACE_GETFPXREGS 18 */
63/* #define PTRACE_SETFPXREGS 19 */
64
65#define PTRACE_OLDSETOPTIONS 21
66
67#define PTRACE_GET_THREAD_AREA 25
68#define PTRACE_SET_THREAD_AREA 26
69
70/* Calls to trace a 64bit program from a 32bit program. */
71#define PTRACE_PEEKTEXT_3264 0xc0
72#define PTRACE_PEEKDATA_3264 0xc1
73#define PTRACE_POKETEXT_3264 0xc2
74#define PTRACE_POKEDATA_3264 0xc3
75#define PTRACE_GET_THREAD_AREA_3264 0xc4
76
77/* Read and write watchpoint registers. */
78enum pt_watch_style {
79 pt_watch_style_mips32,
80 pt_watch_style_mips64
81};
82struct mips32_watch_regs {
83 unsigned int watchlo[8];
84 /* Lower 16 bits of watchhi. */
85 unsigned short watchhi[8];
86 /* Valid mask and I R W bits.
87 * bit 0 -- 1 if W bit is usable.
88 * bit 1 -- 1 if R bit is usable.
89 * bit 2 -- 1 if I bit is usable.
90 * bits 3 - 11 -- Valid watchhi mask bits.
91 */
92 unsigned short watch_masks[8];
93 /* The number of valid watch register pairs. */
94 unsigned int num_valid;
95} __attribute__((aligned(8)));
96
97struct mips64_watch_regs {
98 unsigned long long watchlo[8];
99 unsigned short watchhi[8];
100 unsigned short watch_masks[8];
101 unsigned int num_valid;
102} __attribute__((aligned(8)));
103
104struct pt_watch_regs {
105 enum pt_watch_style style;
106 union {
107 struct mips32_watch_regs mips32;
108 struct mips64_watch_regs mips64;
109 };
110};
111
112#define PTRACE_GET_WATCH_REGS 0xd0
113#define PTRACE_SET_WATCH_REGS 0xd1
114
115
116#endif /* _UAPI_ASM_PTRACE_H */
diff --git a/arch/mips/include/uapi/asm/resource.h b/arch/mips/include/uapi/asm/resource.h
new file mode 100644
index 00000000000..87cb3085269
--- /dev/null
+++ b/arch/mips/include/uapi/asm/resource.h
@@ -0,0 +1,35 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1995, 96, 98, 99, 2000 by Ralf Baechle
7 * Copyright (C) 1999 Silicon Graphics, Inc.
8 */
9#ifndef _ASM_RESOURCE_H
10#define _ASM_RESOURCE_H
11
12
13/*
14 * These five resource limit IDs have a MIPS/Linux-specific ordering,
15 * the rest comes from the generic header:
16 */
17#define RLIMIT_NOFILE 5 /* max number of open files */
18#define RLIMIT_AS 6 /* address space limit */
19#define RLIMIT_RSS 7 /* max resident set size */
20#define RLIMIT_NPROC 8 /* max number of processes */
21#define RLIMIT_MEMLOCK 9 /* max locked-in-memory address space */
22
23/*
24 * SuS says limits have to be unsigned.
25 * Which makes a ton more sense anyway,
26 * but we keep the old value on MIPS32,
27 * for compatibility:
28 */
29#ifdef CONFIG_32BIT
30# define RLIM_INFINITY 0x7fffffffUL
31#endif
32
33#include <asm-generic/resource.h>
34
35#endif /* _ASM_RESOURCE_H */
diff --git a/arch/mips/include/uapi/asm/sembuf.h b/arch/mips/include/uapi/asm/sembuf.h
new file mode 100644
index 00000000000..7281a4decaa
--- /dev/null
+++ b/arch/mips/include/uapi/asm/sembuf.h
@@ -0,0 +1,22 @@
1#ifndef _ASM_SEMBUF_H
2#define _ASM_SEMBUF_H
3
4/*
5 * The semid64_ds structure for the MIPS architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 2 miscellaneous 64-bit values
11 */
12
13struct semid64_ds {
14 struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
15 __kernel_time_t sem_otime; /* last semop time */
16 __kernel_time_t sem_ctime; /* last change time */
17 unsigned long sem_nsems; /* no. of semaphores in array */
18 unsigned long __unused1;
19 unsigned long __unused2;
20};
21
22#endif /* _ASM_SEMBUF_H */
diff --git a/arch/mips/include/uapi/asm/setup.h b/arch/mips/include/uapi/asm/setup.h
new file mode 100644
index 00000000000..93f237bb135
--- /dev/null
+++ b/arch/mips/include/uapi/asm/setup.h
@@ -0,0 +1,7 @@
1#ifndef _UAPI_MIPS_SETUP_H
2#define _UAPI_MIPS_SETUP_H
3
4#define COMMAND_LINE_SIZE 4096
5
6
7#endif /* _UAPI_MIPS_SETUP_H */
diff --git a/arch/mips/include/uapi/asm/sgidefs.h b/arch/mips/include/uapi/asm/sgidefs.h
new file mode 100644
index 00000000000..876442fcfb3
--- /dev/null
+++ b/arch/mips/include/uapi/asm/sgidefs.h
@@ -0,0 +1,44 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1996, 1999, 2001 Ralf Baechle
7 * Copyright (C) 1999 Silicon Graphics, Inc.
8 * Copyright (C) 2001 MIPS Technologies, Inc.
9 */
10#ifndef __ASM_SGIDEFS_H
11#define __ASM_SGIDEFS_H
12
13/*
14 * Using a Linux compiler for building Linux seems logic but not to
15 * everybody.
16 */
17#ifndef __linux__
18#error Use a Linux compiler or give up.
19#endif
20
21/*
22 * Definitions for the ISA levels
23 *
24 * With the introduction of MIPS32 / MIPS64 instruction sets definitions
25 * MIPS ISAs are no longer subsets of each other. Therefore comparisons
26 * on these symbols except with == may result in unexpected results and
27 * are forbidden!
28 */
29#define _MIPS_ISA_MIPS1 1
30#define _MIPS_ISA_MIPS2 2
31#define _MIPS_ISA_MIPS3 3
32#define _MIPS_ISA_MIPS4 4
33#define _MIPS_ISA_MIPS5 5
34#define _MIPS_ISA_MIPS32 6
35#define _MIPS_ISA_MIPS64 7
36
37/*
38 * Subprogram calling convention
39 */
40#define _MIPS_SIM_ABI32 1
41#define _MIPS_SIM_NABI32 2
42#define _MIPS_SIM_ABI64 3
43
44#endif /* __ASM_SGIDEFS_H */
diff --git a/arch/mips/include/uapi/asm/shmbuf.h b/arch/mips/include/uapi/asm/shmbuf.h
new file mode 100644
index 00000000000..f994438277b
--- /dev/null
+++ b/arch/mips/include/uapi/asm/shmbuf.h
@@ -0,0 +1,38 @@
1#ifndef _ASM_SHMBUF_H
2#define _ASM_SHMBUF_H
3
4/*
5 * The shmid64_ds structure for the MIPS architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
10 * - 2 miscellaneous 32-bit rsp. 64-bit values
11 */
12
13struct shmid64_ds {
14 struct ipc64_perm shm_perm; /* operation perms */
15 size_t shm_segsz; /* size of segment (bytes) */
16 __kernel_time_t shm_atime; /* last attach time */
17 __kernel_time_t shm_dtime; /* last detach time */
18 __kernel_time_t shm_ctime; /* last change time */
19 __kernel_pid_t shm_cpid; /* pid of creator */
20 __kernel_pid_t shm_lpid; /* pid of last operator */
21 unsigned long shm_nattch; /* no. of current attaches */
22 unsigned long __unused1;
23 unsigned long __unused2;
24};
25
26struct shminfo64 {
27 unsigned long shmmax;
28 unsigned long shmmin;
29 unsigned long shmmni;
30 unsigned long shmseg;
31 unsigned long shmall;
32 unsigned long __unused1;
33 unsigned long __unused2;
34 unsigned long __unused3;
35 unsigned long __unused4;
36};
37
38#endif /* _ASM_SHMBUF_H */
diff --git a/arch/mips/include/uapi/asm/sigcontext.h b/arch/mips/include/uapi/asm/sigcontext.h
new file mode 100644
index 00000000000..6c9906f59c6
--- /dev/null
+++ b/arch/mips/include/uapi/asm/sigcontext.h
@@ -0,0 +1,78 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1996, 1997, 1999 by Ralf Baechle
7 * Copyright (C) 1999 Silicon Graphics, Inc.
8 */
9#ifndef _UAPI_ASM_SIGCONTEXT_H
10#define _UAPI_ASM_SIGCONTEXT_H
11
12#include <linux/types.h>
13#include <asm/sgidefs.h>
14
15#if _MIPS_SIM == _MIPS_SIM_ABI32
16
17/*
18 * Keep this struct definition in sync with the sigcontext fragment
19 * in arch/mips/tools/offset.c
20 */
21struct sigcontext {
22 unsigned int sc_regmask; /* Unused */
23 unsigned int sc_status; /* Unused */
24 unsigned long long sc_pc;
25 unsigned long long sc_regs[32];
26 unsigned long long sc_fpregs[32];
27 unsigned int sc_acx; /* Was sc_ownedfp */
28 unsigned int sc_fpc_csr;
29 unsigned int sc_fpc_eir; /* Unused */
30 unsigned int sc_used_math;
31 unsigned int sc_dsp; /* dsp status, was sc_ssflags */
32 unsigned long long sc_mdhi;
33 unsigned long long sc_mdlo;
34 unsigned long sc_hi1; /* Was sc_cause */
35 unsigned long sc_lo1; /* Was sc_badvaddr */
36 unsigned long sc_hi2; /* Was sc_sigset[4] */
37 unsigned long sc_lo2;
38 unsigned long sc_hi3;
39 unsigned long sc_lo3;
40};
41
42#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
43
44#if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
45
46#include <linux/posix_types.h>
47/*
48 * Keep this struct definition in sync with the sigcontext fragment
49 * in arch/mips/tools/offset.c
50 *
51 * Warning: this structure illdefined with sc_badvaddr being just an unsigned
52 * int so it was changed to unsigned long in 2.6.0-test1. This may break
53 * binary compatibility - no prisoners.
54 * DSP ASE in 2.6.12-rc4. Turn sc_mdhi and sc_mdlo into an array of four
55 * entries, add sc_dsp and sc_reserved for padding. No prisoners.
56 */
57struct sigcontext {
58 __u64 sc_regs[32];
59 __u64 sc_fpregs[32];
60 __u64 sc_mdhi;
61 __u64 sc_hi1;
62 __u64 sc_hi2;
63 __u64 sc_hi3;
64 __u64 sc_mdlo;
65 __u64 sc_lo1;
66 __u64 sc_lo2;
67 __u64 sc_lo3;
68 __u64 sc_pc;
69 __u32 sc_fpc_csr;
70 __u32 sc_used_math;
71 __u32 sc_dsp;
72 __u32 sc_reserved;
73};
74
75
76#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 */
77
78#endif /* _UAPI_ASM_SIGCONTEXT_H */
diff --git a/arch/mips/include/uapi/asm/siginfo.h b/arch/mips/include/uapi/asm/siginfo.h
new file mode 100644
index 00000000000..73446508d84
--- /dev/null
+++ b/arch/mips/include/uapi/asm/siginfo.h
@@ -0,0 +1,114 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1998, 1999, 2001, 2003 Ralf Baechle
7 * Copyright (C) 2000, 2001 Silicon Graphics, Inc.
8 */
9#ifndef _UAPI_ASM_SIGINFO_H
10#define _UAPI_ASM_SIGINFO_H
11
12
13#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(long) + 2*sizeof(int))
14#undef __ARCH_SI_TRAPNO /* exception code needs to fill this ... */
15
16#define HAVE_ARCH_SIGINFO_T
17
18/*
19 * We duplicate the generic versions - <asm-generic/siginfo.h> is just borked
20 * by design ...
21 */
22#define HAVE_ARCH_COPY_SIGINFO
23struct siginfo;
24
25/*
26 * Careful to keep union _sifields from shifting ...
27 */
28#ifdef CONFIG_32BIT
29#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
30#endif
31#ifdef CONFIG_64BIT
32#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
33#endif
34
35#include <asm-generic/siginfo.h>
36
37typedef struct siginfo {
38 int si_signo;
39 int si_code;
40 int si_errno;
41 int __pad0[SI_MAX_SIZE / sizeof(int) - SI_PAD_SIZE - 3];
42
43 union {
44 int _pad[SI_PAD_SIZE];
45
46 /* kill() */
47 struct {
48 pid_t _pid; /* sender's pid */
49 __ARCH_SI_UID_T _uid; /* sender's uid */
50 } _kill;
51
52 /* POSIX.1b timers */
53 struct {
54 timer_t _tid; /* timer id */
55 int _overrun; /* overrun count */
56 char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)];
57 sigval_t _sigval; /* same as below */
58 int _sys_private; /* not to be passed to user */
59 } _timer;
60
61 /* POSIX.1b signals */
62 struct {
63 pid_t _pid; /* sender's pid */
64 __ARCH_SI_UID_T _uid; /* sender's uid */
65 sigval_t _sigval;
66 } _rt;
67
68 /* SIGCHLD */
69 struct {
70 pid_t _pid; /* which child */
71 __ARCH_SI_UID_T _uid; /* sender's uid */
72 int _status; /* exit code */
73 clock_t _utime;
74 clock_t _stime;
75 } _sigchld;
76
77 /* IRIX SIGCHLD */
78 struct {
79 pid_t _pid; /* which child */
80 clock_t _utime;
81 int _status; /* exit code */
82 clock_t _stime;
83 } _irix_sigchld;
84
85 /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
86 struct {
87 void __user *_addr; /* faulting insn/memory ref. */
88#ifdef __ARCH_SI_TRAPNO
89 int _trapno; /* TRAP # which caused the signal */
90#endif
91 short _addr_lsb;
92 } _sigfault;
93
94 /* SIGPOLL, SIGXFSZ (To do ...) */
95 struct {
96 __ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */
97 int _fd;
98 } _sigpoll;
99 } _sifields;
100} siginfo_t;
101
102/*
103 * si_code values
104 * Again these have been chosen to be IRIX compatible.
105 */
106#undef SI_ASYNCIO
107#undef SI_TIMER
108#undef SI_MESGQ
109#define SI_ASYNCIO -2 /* sent by AIO completion */
110#define SI_TIMER __SI_CODE(__SI_TIMER, -3) /* sent by timer expiration */
111#define SI_MESGQ __SI_CODE(__SI_MESGQ, -4) /* sent by real time mesq state change */
112
113
114#endif /* _UAPI_ASM_SIGINFO_H */
diff --git a/arch/mips/include/uapi/asm/signal.h b/arch/mips/include/uapi/asm/signal.h
new file mode 100644
index 00000000000..3f1237c6c80
--- /dev/null
+++ b/arch/mips/include/uapi/asm/signal.h
@@ -0,0 +1,123 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1995, 96, 97, 98, 99, 2003 by Ralf Baechle
7 * Copyright (C) 1999 Silicon Graphics, Inc.
8 */
9#ifndef _UAPI_ASM_SIGNAL_H
10#define _UAPI_ASM_SIGNAL_H
11
12#include <linux/types.h>
13
14#define _NSIG 128
15#define _NSIG_BPW (sizeof(unsigned long) * 8)
16#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
17
18typedef struct {
19 unsigned long sig[_NSIG_WORDS];
20} sigset_t;
21
22typedef unsigned long old_sigset_t; /* at least 32 bits */
23
24#define SIGHUP 1 /* Hangup (POSIX). */
25#define SIGINT 2 /* Interrupt (ANSI). */
26#define SIGQUIT 3 /* Quit (POSIX). */
27#define SIGILL 4 /* Illegal instruction (ANSI). */
28#define SIGTRAP 5 /* Trace trap (POSIX). */
29#define SIGIOT 6 /* IOT trap (4.2 BSD). */
30#define SIGABRT SIGIOT /* Abort (ANSI). */
31#define SIGEMT 7
32#define SIGFPE 8 /* Floating-point exception (ANSI). */
33#define SIGKILL 9 /* Kill, unblockable (POSIX). */
34#define SIGBUS 10 /* BUS error (4.2 BSD). */
35#define SIGSEGV 11 /* Segmentation violation (ANSI). */
36#define SIGSYS 12
37#define SIGPIPE 13 /* Broken pipe (POSIX). */
38#define SIGALRM 14 /* Alarm clock (POSIX). */
39#define SIGTERM 15 /* Termination (ANSI). */
40#define SIGUSR1 16 /* User-defined signal 1 (POSIX). */
41#define SIGUSR2 17 /* User-defined signal 2 (POSIX). */
42#define SIGCHLD 18 /* Child status has changed (POSIX). */
43#define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */
44#define SIGPWR 19 /* Power failure restart (System V). */
45#define SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */
46#define SIGURG 21 /* Urgent condition on socket (4.2 BSD). */
47#define SIGIO 22 /* I/O now possible (4.2 BSD). */
48#define SIGPOLL SIGIO /* Pollable event occurred (System V). */
49#define SIGSTOP 23 /* Stop, unblockable (POSIX). */
50#define SIGTSTP 24 /* Keyboard stop (POSIX). */
51#define SIGCONT 25 /* Continue (POSIX). */
52#define SIGTTIN 26 /* Background read from tty (POSIX). */
53#define SIGTTOU 27 /* Background write to tty (POSIX). */
54#define SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */
55#define SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */
56#define SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */
57#define SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */
58
59/* These should not be considered constants from userland. */
60#define SIGRTMIN 32
61#define SIGRTMAX _NSIG
62
63/*
64 * SA_FLAGS values:
65 *
66 * SA_ONSTACK indicates that a registered stack_t will be used.
67 * SA_RESTART flag to get restarting signals (which were the default long ago)
68 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
69 * SA_RESETHAND clears the handler when the signal is delivered.
70 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
71 * SA_NODEFER prevents the current signal from being masked in the handler.
72 *
73 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
74 * Unix names RESETHAND and NODEFER respectively.
75 */
76#define SA_ONSTACK 0x08000000
77#define SA_RESETHAND 0x80000000
78#define SA_RESTART 0x10000000
79#define SA_SIGINFO 0x00000008
80#define SA_NODEFER 0x40000000
81#define SA_NOCLDWAIT 0x00010000
82#define SA_NOCLDSTOP 0x00000001
83
84#define SA_NOMASK SA_NODEFER
85#define SA_ONESHOT SA_RESETHAND
86
87#define SA_RESTORER 0x04000000 /* Only for o32 */
88
89/*
90 * sigaltstack controls
91 */
92#define SS_ONSTACK 1
93#define SS_DISABLE 2
94
95#define MINSIGSTKSZ 2048
96#define SIGSTKSZ 8192
97
98
99#define SIG_BLOCK 1 /* for blocking signals */
100#define SIG_UNBLOCK 2 /* for unblocking signals */
101#define SIG_SETMASK 3 /* for setting the signal mask */
102
103#include <asm-generic/signal-defs.h>
104
105struct sigaction {
106 unsigned int sa_flags;
107 __sighandler_t sa_handler;
108 sigset_t sa_mask;
109};
110
111struct k_sigaction {
112 struct sigaction sa;
113};
114
115/* IRIX compatible stack_t */
116typedef struct sigaltstack {
117 void __user *ss_sp;
118 size_t ss_size;
119 int ss_flags;
120} stack_t;
121
122
123#endif /* _UAPI_ASM_SIGNAL_H */
diff --git a/arch/mips/include/uapi/asm/socket.h b/arch/mips/include/uapi/asm/socket.h
new file mode 100644
index 00000000000..c5ed59549cb
--- /dev/null
+++ b/arch/mips/include/uapi/asm/socket.h
@@ -0,0 +1,93 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1997, 1999, 2000, 2001 Ralf Baechle
7 * Copyright (C) 2000, 2001 Silicon Graphics, Inc.
8 */
9#ifndef _UAPI_ASM_SOCKET_H
10#define _UAPI_ASM_SOCKET_H
11
12#include <asm/sockios.h>
13
14/*
15 * For setsockopt(2)
16 *
17 * This defines are ABI conformant as far as Linux supports these ...
18 */
19#define SOL_SOCKET 0xffff
20
21#define SO_DEBUG 0x0001 /* Record debugging information. */
22#define SO_REUSEADDR 0x0004 /* Allow reuse of local addresses. */
23#define SO_KEEPALIVE 0x0008 /* Keep connections alive and send
24 SIGPIPE when they die. */
25#define SO_DONTROUTE 0x0010 /* Don't do local routing. */
26#define SO_BROADCAST 0x0020 /* Allow transmission of
27 broadcast messages. */
28#define SO_LINGER 0x0080 /* Block on close of a reliable
29 socket to transmit pending data. */
30#define SO_OOBINLINE 0x0100 /* Receive out-of-band data in-band. */
31#if 0
32To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */
33#endif
34
35#define SO_TYPE 0x1008 /* Compatible name for SO_STYLE. */
36#define SO_STYLE SO_TYPE /* Synonym */
37#define SO_ERROR 0x1007 /* get error status and clear */
38#define SO_SNDBUF 0x1001 /* Send buffer size. */
39#define SO_RCVBUF 0x1002 /* Receive buffer. */
40#define SO_SNDLOWAT 0x1003 /* send low-water mark */
41#define SO_RCVLOWAT 0x1004 /* receive low-water mark */
42#define SO_SNDTIMEO 0x1005 /* send timeout */
43#define SO_RCVTIMEO 0x1006 /* receive timeout */
44#define SO_ACCEPTCONN 0x1009
45#define SO_PROTOCOL 0x1028 /* protocol type */
46#define SO_DOMAIN 0x1029 /* domain/socket family */
47
48/* linux-specific, might as well be the same as on i386 */
49#define SO_NO_CHECK 11
50#define SO_PRIORITY 12
51#define SO_BSDCOMPAT 14
52
53#define SO_PASSCRED 17
54#define SO_PEERCRED 18
55
56/* Security levels - as per NRL IPv6 - don't actually do anything */
57#define SO_SECURITY_AUTHENTICATION 22
58#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
59#define SO_SECURITY_ENCRYPTION_NETWORK 24
60
61#define SO_BINDTODEVICE 25
62
63/* Socket filtering */
64#define SO_ATTACH_FILTER 26
65#define SO_DETACH_FILTER 27
66
67#define SO_PEERNAME 28
68#define SO_TIMESTAMP 29
69#define SCM_TIMESTAMP SO_TIMESTAMP
70
71#define SO_PEERSEC 30
72#define SO_SNDBUFFORCE 31
73#define SO_RCVBUFFORCE 33
74#define SO_PASSSEC 34
75#define SO_TIMESTAMPNS 35
76#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
77
78#define SO_MARK 36
79
80#define SO_TIMESTAMPING 37
81#define SCM_TIMESTAMPING SO_TIMESTAMPING
82
83#define SO_RXQ_OVFL 40
84
85#define SO_WIFI_STATUS 41
86#define SCM_WIFI_STATUS SO_WIFI_STATUS
87#define SO_PEEK_OFF 42
88
89/* Instruct lower device to use last 4-bytes of skb data as FCS */
90#define SO_NOFCS 43
91
92
93#endif /* _UAPI_ASM_SOCKET_H */
diff --git a/arch/mips/include/uapi/asm/sockios.h b/arch/mips/include/uapi/asm/sockios.h
new file mode 100644
index 00000000000..ed1a5f78d22
--- /dev/null
+++ b/arch/mips/include/uapi/asm/sockios.h
@@ -0,0 +1,26 @@
1/*
2 * Socket-level I/O control calls.
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 1995 by Ralf Baechle
9 */
10#ifndef _ASM_SOCKIOS_H
11#define _ASM_SOCKIOS_H
12
13#include <asm/ioctl.h>
14
15/* Socket-level I/O control calls. */
16#define FIOGETOWN _IOR('f', 123, int)
17#define FIOSETOWN _IOW('f', 124, int)
18
19#define SIOCATMARK _IOR('s', 7, int)
20#define SIOCSPGRP _IOW('s', 8, pid_t)
21#define SIOCGPGRP _IOR('s', 9, pid_t)
22
23#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
24#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
25
26#endif /* _ASM_SOCKIOS_H */
diff --git a/arch/mips/include/uapi/asm/stat.h b/arch/mips/include/uapi/asm/stat.h
new file mode 100644
index 00000000000..fe9a4c3ec5a
--- /dev/null
+++ b/arch/mips/include/uapi/asm/stat.h
@@ -0,0 +1,132 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1995, 1999, 2000 Ralf Baechle
7 * Copyright (C) 2000 Silicon Graphics, Inc.
8 */
9#ifndef _ASM_STAT_H
10#define _ASM_STAT_H
11
12#include <linux/types.h>
13
14#include <asm/sgidefs.h>
15
16#if (_MIPS_SIM == _MIPS_SIM_ABI32) || (_MIPS_SIM == _MIPS_SIM_NABI32)
17
18struct stat {
19 unsigned st_dev;
20 long st_pad1[3]; /* Reserved for network id */
21 ino_t st_ino;
22 mode_t st_mode;
23 __u32 st_nlink;
24 uid_t st_uid;
25 gid_t st_gid;
26 unsigned st_rdev;
27 long st_pad2[2];
28 off_t st_size;
29 long st_pad3;
30 /*
31 * Actually this should be timestruc_t st_atime, st_mtime and st_ctime
32 * but we don't have it under Linux.
33 */
34 time_t st_atime;
35 long st_atime_nsec;
36 time_t st_mtime;
37 long st_mtime_nsec;
38 time_t st_ctime;
39 long st_ctime_nsec;
40 long st_blksize;
41 long st_blocks;
42 long st_pad4[14];
43};
44
45/*
46 * This matches struct stat64 in glibc2.1, hence the absolutely insane
47 * amounts of padding around dev_t's. The memory layout is the same as of
48 * struct stat of the 64-bit kernel.
49 */
50
51struct stat64 {
52 unsigned long st_dev;
53 unsigned long st_pad0[3]; /* Reserved for st_dev expansion */
54
55 unsigned long long st_ino;
56
57 mode_t st_mode;
58 __u32 st_nlink;
59
60 uid_t st_uid;
61 gid_t st_gid;
62
63 unsigned long st_rdev;
64 unsigned long st_pad1[3]; /* Reserved for st_rdev expansion */
65
66 long long st_size;
67
68 /*
69 * Actually this should be timestruc_t st_atime, st_mtime and st_ctime
70 * but we don't have it under Linux.
71 */
72 time_t st_atime;
73 unsigned long st_atime_nsec; /* Reserved for st_atime expansion */
74
75 time_t st_mtime;
76 unsigned long st_mtime_nsec; /* Reserved for st_mtime expansion */
77
78 time_t st_ctime;
79 unsigned long st_ctime_nsec; /* Reserved for st_ctime expansion */
80
81 unsigned long st_blksize;
82 unsigned long st_pad2;
83
84 long long st_blocks;
85};
86
87#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
88
89#if _MIPS_SIM == _MIPS_SIM_ABI64
90
91/* The memory layout is the same as of struct stat64 of the 32-bit kernel. */
92struct stat {
93 unsigned int st_dev;
94 unsigned int st_pad0[3]; /* Reserved for st_dev expansion */
95
96 unsigned long st_ino;
97
98 mode_t st_mode;
99 __u32 st_nlink;
100
101 uid_t st_uid;
102 gid_t st_gid;
103
104 unsigned int st_rdev;
105 unsigned int st_pad1[3]; /* Reserved for st_rdev expansion */
106
107 off_t st_size;
108
109 /*
110 * Actually this should be timestruc_t st_atime, st_mtime and st_ctime
111 * but we don't have it under Linux.
112 */
113 unsigned int st_atime;
114 unsigned int st_atime_nsec;
115
116 unsigned int st_mtime;
117 unsigned int st_mtime_nsec;
118
119 unsigned int st_ctime;
120 unsigned int st_ctime_nsec;
121
122 unsigned int st_blksize;
123 unsigned int st_pad2;
124
125 unsigned long st_blocks;
126};
127
128#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
129
130#define STAT_HAVE_NSEC 1
131
132#endif /* _ASM_STAT_H */
diff --git a/arch/mips/include/uapi/asm/statfs.h b/arch/mips/include/uapi/asm/statfs.h
new file mode 100644
index 00000000000..0f805c7a42a
--- /dev/null
+++ b/arch/mips/include/uapi/asm/statfs.h
@@ -0,0 +1,100 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1995, 1999 by Ralf Baechle
7 */
8#ifndef _ASM_STATFS_H
9#define _ASM_STATFS_H
10
11#include <linux/posix_types.h>
12#include <asm/sgidefs.h>
13
14#ifndef __KERNEL_STRICT_NAMES
15
16#include <linux/types.h>
17
18typedef __kernel_fsid_t fsid_t;
19
20#endif
21
22struct statfs {
23 long f_type;
24#define f_fstyp f_type
25 long f_bsize;
26 long f_frsize; /* Fragment size - unsupported */
27 long f_blocks;
28 long f_bfree;
29 long f_files;
30 long f_ffree;
31 long f_bavail;
32
33 /* Linux specials */
34 __kernel_fsid_t f_fsid;
35 long f_namelen;
36 long f_flags;
37 long f_spare[5];
38};
39
40#if (_MIPS_SIM == _MIPS_SIM_ABI32) || (_MIPS_SIM == _MIPS_SIM_NABI32)
41
42/*
43 * Unlike the traditional version the LFAPI version has none of the ABI junk
44 */
45struct statfs64 {
46 __u32 f_type;
47 __u32 f_bsize;
48 __u32 f_frsize; /* Fragment size - unsupported */
49 __u32 __pad;
50 __u64 f_blocks;
51 __u64 f_bfree;
52 __u64 f_files;
53 __u64 f_ffree;
54 __u64 f_bavail;
55 __kernel_fsid_t f_fsid;
56 __u32 f_namelen;
57 __u32 f_flags;
58 __u32 f_spare[5];
59};
60
61#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
62
63#if _MIPS_SIM == _MIPS_SIM_ABI64
64
65struct statfs64 { /* Same as struct statfs */
66 long f_type;
67 long f_bsize;
68 long f_frsize; /* Fragment size - unsupported */
69 long f_blocks;
70 long f_bfree;
71 long f_files;
72 long f_ffree;
73 long f_bavail;
74
75 /* Linux specials */
76 __kernel_fsid_t f_fsid;
77 long f_namelen;
78 long f_flags;
79 long f_spare[5];
80};
81
82struct compat_statfs64 {
83 __u32 f_type;
84 __u32 f_bsize;
85 __u32 f_frsize; /* Fragment size - unsupported */
86 __u32 __pad;
87 __u64 f_blocks;
88 __u64 f_bfree;
89 __u64 f_files;
90 __u64 f_ffree;
91 __u64 f_bavail;
92 __kernel_fsid_t f_fsid;
93 __u32 f_namelen;
94 __u32 f_flags;
95 __u32 f_spare[5];
96};
97
98#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
99
100#endif /* _ASM_STATFS_H */
diff --git a/arch/mips/include/uapi/asm/swab.h b/arch/mips/include/uapi/asm/swab.h
new file mode 100644
index 00000000000..97c2f81b4b4
--- /dev/null
+++ b/arch/mips/include/uapi/asm/swab.h
@@ -0,0 +1,59 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1996, 99, 2003 by Ralf Baechle
7 */
8#ifndef _ASM_SWAB_H
9#define _ASM_SWAB_H
10
11#include <linux/compiler.h>
12#include <linux/types.h>
13
14#define __SWAB_64_THRU_32__
15
16#ifdef CONFIG_CPU_MIPSR2
17
18static inline __attribute_const__ __u16 __arch_swab16(__u16 x)
19{
20 __asm__(
21 " wsbh %0, %1 \n"
22 : "=r" (x)
23 : "r" (x));
24
25 return x;
26}
27#define __arch_swab16 __arch_swab16
28
29static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
30{
31 __asm__(
32 " wsbh %0, %1 \n"
33 " rotr %0, %0, 16 \n"
34 : "=r" (x)
35 : "r" (x));
36
37 return x;
38}
39#define __arch_swab32 __arch_swab32
40
41/*
42 * Having already checked for CONFIG_CPU_MIPSR2, enable the
43 * optimized version for 64-bit kernel on r2 CPUs.
44 */
45#ifdef CONFIG_64BIT
46static inline __attribute_const__ __u64 __arch_swab64(__u64 x)
47{
48 __asm__(
49 " dsbh %0, %1\n"
50 " dshd %0, %0"
51 : "=r" (x)
52 : "r" (x));
53
54 return x;
55}
56#define __arch_swab64 __arch_swab64
57#endif /* CONFIG_64BIT */
58#endif /* CONFIG_CPU_MIPSR2 */
59#endif /* _ASM_SWAB_H */
diff --git a/arch/mips/include/uapi/asm/sysmips.h b/arch/mips/include/uapi/asm/sysmips.h
new file mode 100644
index 00000000000..4f47b7d6a5f
--- /dev/null
+++ b/arch/mips/include/uapi/asm/sysmips.h
@@ -0,0 +1,25 @@
1/*
2 * Definitions for the MIPS sysmips(2) call
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 1995 by Ralf Baechle
9 */
10#ifndef _ASM_SYSMIPS_H
11#define _ASM_SYSMIPS_H
12
13/*
14 * Commands for the sysmips(2) call
15 *
16 * sysmips(2) is deprecated - though some existing software uses it.
17 * We only support the following commands.
18 */
19#define SETNAME 1 /* set hostname */
20#define FLUSH_CACHE 3 /* writeback and invalidate caches */
21#define MIPS_FIXADE 7 /* control address error fixing */
22#define MIPS_RDNVRAM 10 /* read NVRAM */
23#define MIPS_ATOMIC_SET 2001 /* atomically set variable */
24
25#endif /* _ASM_SYSMIPS_H */
diff --git a/arch/mips/include/uapi/asm/termbits.h b/arch/mips/include/uapi/asm/termbits.h
new file mode 100644
index 00000000000..76630b396fa
--- /dev/null
+++ b/arch/mips/include/uapi/asm/termbits.h
@@ -0,0 +1,227 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1995, 96, 99, 2001, 06 Ralf Baechle
7 * Copyright (C) 1999 Silicon Graphics, Inc.
8 * Copyright (C) 2001 MIPS Technologies, Inc.
9 */
10#ifndef _ASM_TERMBITS_H
11#define _ASM_TERMBITS_H
12
13#include <linux/posix_types.h>
14
15typedef unsigned char cc_t;
16typedef unsigned int speed_t;
17typedef unsigned int tcflag_t;
18
19/*
20 * The ABI says nothing about NCC but seems to use NCCS as
21 * replacement for it in struct termio
22 */
23#define NCCS 23
24struct termios {
25 tcflag_t c_iflag; /* input mode flags */
26 tcflag_t c_oflag; /* output mode flags */
27 tcflag_t c_cflag; /* control mode flags */
28 tcflag_t c_lflag; /* local mode flags */
29 cc_t c_line; /* line discipline */
30 cc_t c_cc[NCCS]; /* control characters */
31};
32
33struct termios2 {
34 tcflag_t c_iflag; /* input mode flags */
35 tcflag_t c_oflag; /* output mode flags */
36 tcflag_t c_cflag; /* control mode flags */
37 tcflag_t c_lflag; /* local mode flags */
38 cc_t c_line; /* line discipline */
39 cc_t c_cc[NCCS]; /* control characters */
40 speed_t c_ispeed; /* input speed */
41 speed_t c_ospeed; /* output speed */
42};
43
44struct ktermios {
45 tcflag_t c_iflag; /* input mode flags */
46 tcflag_t c_oflag; /* output mode flags */
47 tcflag_t c_cflag; /* control mode flags */
48 tcflag_t c_lflag; /* local mode flags */
49 cc_t c_line; /* line discipline */
50 cc_t c_cc[NCCS]; /* control characters */
51 speed_t c_ispeed; /* input speed */
52 speed_t c_ospeed; /* output speed */
53};
54
55/* c_cc characters */
56#define VINTR 0 /* Interrupt character [ISIG]. */
57#define VQUIT 1 /* Quit character [ISIG]. */
58#define VERASE 2 /* Erase character [ICANON]. */
59#define VKILL 3 /* Kill-line character [ICANON]. */
60#define VMIN 4 /* Minimum number of bytes read at once [!ICANON]. */
61#define VTIME 5 /* Time-out value (tenths of a second) [!ICANON]. */
62#define VEOL2 6 /* Second EOL character [ICANON]. */
63#define VSWTC 7 /* ??? */
64#define VSWTCH VSWTC
65#define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */
66#define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */
67#define VSUSP 10 /* Suspend character [ISIG]. */
68#if 0
69/*
70 * VDSUSP is not supported
71 */
72#define VDSUSP 11 /* Delayed suspend character [ISIG]. */
73#endif
74#define VREPRINT 12 /* Reprint-line character [ICANON]. */
75#define VDISCARD 13 /* Discard character [IEXTEN]. */
76#define VWERASE 14 /* Word-erase character [ICANON]. */
77#define VLNEXT 15 /* Literal-next character [IEXTEN]. */
78#define VEOF 16 /* End-of-file character [ICANON]. */
79#define VEOL 17 /* End-of-line character [ICANON]. */
80
81/* c_iflag bits */
82#define IGNBRK 0000001 /* Ignore break condition. */
83#define BRKINT 0000002 /* Signal interrupt on break. */
84#define IGNPAR 0000004 /* Ignore characters with parity errors. */
85#define PARMRK 0000010 /* Mark parity and framing errors. */
86#define INPCK 0000020 /* Enable input parity check. */
87#define ISTRIP 0000040 /* Strip 8th bit off characters. */
88#define INLCR 0000100 /* Map NL to CR on input. */
89#define IGNCR 0000200 /* Ignore CR. */
90#define ICRNL 0000400 /* Map CR to NL on input. */
91#define IUCLC 0001000 /* Map upper case to lower case on input. */
92#define IXON 0002000 /* Enable start/stop output control. */
93#define IXANY 0004000 /* Any character will restart after stop. */
94#define IXOFF 0010000 /* Enable start/stop input control. */
95#define IMAXBEL 0020000 /* Ring bell when input queue is full. */
96#define IUTF8 0040000 /* Input is UTF-8 */
97
98/* c_oflag bits */
99#define OPOST 0000001 /* Perform output processing. */
100#define OLCUC 0000002 /* Map lower case to upper case on output. */
101#define ONLCR 0000004 /* Map NL to CR-NL on output. */
102#define OCRNL 0000010
103#define ONOCR 0000020
104#define ONLRET 0000040
105#define OFILL 0000100
106#define OFDEL 0000200
107#define NLDLY 0000400
108#define NL0 0000000
109#define NL1 0000400
110#define CRDLY 0003000
111#define CR0 0000000
112#define CR1 0001000
113#define CR2 0002000
114#define CR3 0003000
115#define TABDLY 0014000
116#define TAB0 0000000
117#define TAB1 0004000
118#define TAB2 0010000
119#define TAB3 0014000
120#define XTABS 0014000
121#define BSDLY 0020000
122#define BS0 0000000
123#define BS1 0020000
124#define VTDLY 0040000
125#define VT0 0000000
126#define VT1 0040000
127#define FFDLY 0100000
128#define FF0 0000000
129#define FF1 0100000
130/*
131#define PAGEOUT ???
132#define WRAP ???
133 */
134
135/* c_cflag bit meaning */
136#define CBAUD 0010017
137#define B0 0000000 /* hang up */
138#define B50 0000001
139#define B75 0000002
140#define B110 0000003
141#define B134 0000004
142#define B150 0000005
143#define B200 0000006
144#define B300 0000007
145#define B600 0000010
146#define B1200 0000011
147#define B1800 0000012
148#define B2400 0000013
149#define B4800 0000014
150#define B9600 0000015
151#define B19200 0000016
152#define B38400 0000017
153#define EXTA B19200
154#define EXTB B38400
155#define CSIZE 0000060 /* Number of bits per byte (mask). */
156#define CS5 0000000 /* 5 bits per byte. */
157#define CS6 0000020 /* 6 bits per byte. */
158#define CS7 0000040 /* 7 bits per byte. */
159#define CS8 0000060 /* 8 bits per byte. */
160#define CSTOPB 0000100 /* Two stop bits instead of one. */
161#define CREAD 0000200 /* Enable receiver. */
162#define PARENB 0000400 /* Parity enable. */
163#define PARODD 0001000 /* Odd parity instead of even. */
164#define HUPCL 0002000 /* Hang up on last close. */
165#define CLOCAL 0004000 /* Ignore modem status lines. */
166#define CBAUDEX 0010000
167#define BOTHER 0010000
168#define B57600 0010001
169#define B115200 0010002
170#define B230400 0010003
171#define B460800 0010004
172#define B500000 0010005
173#define B576000 0010006
174#define B921600 0010007
175#define B1000000 0010010
176#define B1152000 0010011
177#define B1500000 0010012
178#define B2000000 0010013
179#define B2500000 0010014
180#define B3000000 0010015
181#define B3500000 0010016
182#define B4000000 0010017
183#define CIBAUD 002003600000 /* input baud rate */
184#define CMSPAR 010000000000 /* mark or space (stick) parity */
185#define CRTSCTS 020000000000 /* flow control */
186
187#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
188
189/* c_lflag bits */
190#define ISIG 0000001 /* Enable signals. */
191#define ICANON 0000002 /* Do erase and kill processing. */
192#define XCASE 0000004
193#define ECHO 0000010 /* Enable echo. */
194#define ECHOE 0000020 /* Visual erase for ERASE. */
195#define ECHOK 0000040 /* Echo NL after KILL. */
196#define ECHONL 0000100 /* Echo NL even if ECHO is off. */
197#define NOFLSH 0000200 /* Disable flush after interrupt. */
198#define IEXTEN 0000400 /* Enable DISCARD and LNEXT. */
199#define ECHOCTL 0001000 /* Echo control characters as ^X. */
200#define ECHOPRT 0002000 /* Hardcopy visual erase. */
201#define ECHOKE 0004000 /* Visual erase for KILL. */
202#define FLUSHO 0020000
203#define PENDIN 0040000 /* Retype pending input (state). */
204#define TOSTOP 0100000 /* Send SIGTTOU for background output. */
205#define ITOSTOP TOSTOP
206#define EXTPROC 0200000 /* External processing on pty */
207
208/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
209#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
210
211/* tcflow() and TCXONC use these */
212#define TCOOFF 0 /* Suspend output. */
213#define TCOON 1 /* Restart suspended output. */
214#define TCIOFF 2 /* Send a STOP character. */
215#define TCION 3 /* Send a START character. */
216
217/* tcflush() and TCFLSH use these */
218#define TCIFLUSH 0 /* Discard data received but not yet read. */
219#define TCOFLUSH 1 /* Discard data written but not yet sent. */
220#define TCIOFLUSH 2 /* Discard all pending data. */
221
222/* tcsetattr uses these */
223#define TCSANOW TCSETS /* Change immediately. */
224#define TCSADRAIN TCSETSW /* Change when pending output is written. */
225#define TCSAFLUSH TCSETSF /* Flush pending input before changing. */
226
227#endif /* _ASM_TERMBITS_H */
diff --git a/arch/mips/include/uapi/asm/termios.h b/arch/mips/include/uapi/asm/termios.h
new file mode 100644
index 00000000000..574fbdfb720
--- /dev/null
+++ b/arch/mips/include/uapi/asm/termios.h
@@ -0,0 +1,80 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1995, 1996, 2000, 2001 by Ralf Baechle
7 * Copyright (C) 2000, 2001 Silicon Graphics, Inc.
8 */
9#ifndef _UAPI_ASM_TERMIOS_H
10#define _UAPI_ASM_TERMIOS_H
11
12#include <linux/errno.h>
13#include <asm/termbits.h>
14#include <asm/ioctls.h>
15
16struct sgttyb {
17 char sg_ispeed;
18 char sg_ospeed;
19 char sg_erase;
20 char sg_kill;
21 int sg_flags; /* SGI special - int, not short */
22};
23
24struct tchars {
25 char t_intrc;
26 char t_quitc;
27 char t_startc;
28 char t_stopc;
29 char t_eofc;
30 char t_brkc;
31};
32
33struct ltchars {
34 char t_suspc; /* stop process signal */
35 char t_dsuspc; /* delayed stop process signal */
36 char t_rprntc; /* reprint line */
37 char t_flushc; /* flush output (toggles) */
38 char t_werasc; /* word erase */
39 char t_lnextc; /* literal next character */
40};
41
42/* TIOCGSIZE, TIOCSSIZE not defined yet. Only needed for SunOS source
43 compatibility anyway ... */
44
45struct winsize {
46 unsigned short ws_row;
47 unsigned short ws_col;
48 unsigned short ws_xpixel;
49 unsigned short ws_ypixel;
50};
51
52#define NCC 8
53struct termio {
54 unsigned short c_iflag; /* input mode flags */
55 unsigned short c_oflag; /* output mode flags */
56 unsigned short c_cflag; /* control mode flags */
57 unsigned short c_lflag; /* local mode flags */
58 char c_line; /* line discipline */
59 unsigned char c_cc[NCCS]; /* control characters */
60};
61
62
63/* modem lines */
64#define TIOCM_LE 0x001 /* line enable */
65#define TIOCM_DTR 0x002 /* data terminal ready */
66#define TIOCM_RTS 0x004 /* request to send */
67#define TIOCM_ST 0x010 /* secondary transmit */
68#define TIOCM_SR 0x020 /* secondary receive */
69#define TIOCM_CTS 0x040 /* clear to send */
70#define TIOCM_CAR 0x100 /* carrier detect */
71#define TIOCM_CD TIOCM_CAR
72#define TIOCM_RNG 0x200 /* ring */
73#define TIOCM_RI TIOCM_RNG
74#define TIOCM_DSR 0x400 /* data set ready */
75#define TIOCM_OUT1 0x2000
76#define TIOCM_OUT2 0x4000
77#define TIOCM_LOOP 0x8000
78
79
80#endif /* _UAPI_ASM_TERMIOS_H */
diff --git a/arch/mips/include/uapi/asm/types.h b/arch/mips/include/uapi/asm/types.h
new file mode 100644
index 00000000000..7ac9d0baad8
--- /dev/null
+++ b/arch/mips/include/uapi/asm/types.h
@@ -0,0 +1,27 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1994, 1995, 1996, 1999 by Ralf Baechle
7 * Copyright (C) 2008 Wind River Systems,
8 * written by Ralf Baechle
9 * Copyright (C) 1999 Silicon Graphics, Inc.
10 */
11#ifndef _UAPI_ASM_TYPES_H
12#define _UAPI_ASM_TYPES_H
13
14/*
15 * We don't use int-l64.h for the kernel anymore but still use it for
16 * userspace to avoid code changes.
17 */
18#ifndef __KERNEL__
19# if _MIPS_SZLONG == 64
20# include <asm-generic/int-l64.h>
21# else
22# include <asm-generic/int-ll64.h>
23# endif
24#endif
25
26
27#endif /* _UAPI_ASM_TYPES_H */
diff --git a/arch/mips/include/uapi/asm/unistd.h b/arch/mips/include/uapi/asm/unistd.h
new file mode 100644
index 00000000000..cc98a9dcb01
--- /dev/null
+++ b/arch/mips/include/uapi/asm/unistd.h
@@ -0,0 +1,1035 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1995, 96, 97, 98, 99, 2000 by Ralf Baechle
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 *
9 * Changed system calls macros _syscall5 - _syscall7 to push args 5 to 7 onto
10 * the stack. Robin Farine for ACN S.A, Copyright (C) 1996 by ACN S.A
11 */
12#ifndef _UAPI_ASM_UNISTD_H
13#define _UAPI_ASM_UNISTD_H
14
15#include <asm/sgidefs.h>
16
17#if _MIPS_SIM == _MIPS_SIM_ABI32
18
19/*
20 * Linux o32 style syscalls are in the range from 4000 to 4999.
21 */
22#define __NR_Linux 4000
23#define __NR_syscall (__NR_Linux + 0)
24#define __NR_exit (__NR_Linux + 1)
25#define __NR_fork (__NR_Linux + 2)
26#define __NR_read (__NR_Linux + 3)
27#define __NR_write (__NR_Linux + 4)
28#define __NR_open (__NR_Linux + 5)
29#define __NR_close (__NR_Linux + 6)
30#define __NR_waitpid (__NR_Linux + 7)
31#define __NR_creat (__NR_Linux + 8)
32#define __NR_link (__NR_Linux + 9)
33#define __NR_unlink (__NR_Linux + 10)
34#define __NR_execve (__NR_Linux + 11)
35#define __NR_chdir (__NR_Linux + 12)
36#define __NR_time (__NR_Linux + 13)
37#define __NR_mknod (__NR_Linux + 14)
38#define __NR_chmod (__NR_Linux + 15)
39#define __NR_lchown (__NR_Linux + 16)
40#define __NR_break (__NR_Linux + 17)
41#define __NR_unused18 (__NR_Linux + 18)
42#define __NR_lseek (__NR_Linux + 19)
43#define __NR_getpid (__NR_Linux + 20)
44#define __NR_mount (__NR_Linux + 21)
45#define __NR_umount (__NR_Linux + 22)
46#define __NR_setuid (__NR_Linux + 23)
47#define __NR_getuid (__NR_Linux + 24)
48#define __NR_stime (__NR_Linux + 25)
49#define __NR_ptrace (__NR_Linux + 26)
50#define __NR_alarm (__NR_Linux + 27)
51#define __NR_unused28 (__NR_Linux + 28)
52#define __NR_pause (__NR_Linux + 29)
53#define __NR_utime (__NR_Linux + 30)
54#define __NR_stty (__NR_Linux + 31)
55#define __NR_gtty (__NR_Linux + 32)
56#define __NR_access (__NR_Linux + 33)
57#define __NR_nice (__NR_Linux + 34)
58#define __NR_ftime (__NR_Linux + 35)
59#define __NR_sync (__NR_Linux + 36)
60#define __NR_kill (__NR_Linux + 37)
61#define __NR_rename (__NR_Linux + 38)
62#define __NR_mkdir (__NR_Linux + 39)
63#define __NR_rmdir (__NR_Linux + 40)
64#define __NR_dup (__NR_Linux + 41)
65#define __NR_pipe (__NR_Linux + 42)
66#define __NR_times (__NR_Linux + 43)
67#define __NR_prof (__NR_Linux + 44)
68#define __NR_brk (__NR_Linux + 45)
69#define __NR_setgid (__NR_Linux + 46)
70#define __NR_getgid (__NR_Linux + 47)
71#define __NR_signal (__NR_Linux + 48)
72#define __NR_geteuid (__NR_Linux + 49)
73#define __NR_getegid (__NR_Linux + 50)
74#define __NR_acct (__NR_Linux + 51)
75#define __NR_umount2 (__NR_Linux + 52)
76#define __NR_lock (__NR_Linux + 53)
77#define __NR_ioctl (__NR_Linux + 54)
78#define __NR_fcntl (__NR_Linux + 55)
79#define __NR_mpx (__NR_Linux + 56)
80#define __NR_setpgid (__NR_Linux + 57)
81#define __NR_ulimit (__NR_Linux + 58)
82#define __NR_unused59 (__NR_Linux + 59)
83#define __NR_umask (__NR_Linux + 60)
84#define __NR_chroot (__NR_Linux + 61)
85#define __NR_ustat (__NR_Linux + 62)
86#define __NR_dup2 (__NR_Linux + 63)
87#define __NR_getppid (__NR_Linux + 64)
88#define __NR_getpgrp (__NR_Linux + 65)
89#define __NR_setsid (__NR_Linux + 66)
90#define __NR_sigaction (__NR_Linux + 67)
91#define __NR_sgetmask (__NR_Linux + 68)
92#define __NR_ssetmask (__NR_Linux + 69)
93#define __NR_setreuid (__NR_Linux + 70)
94#define __NR_setregid (__NR_Linux + 71)
95#define __NR_sigsuspend (__NR_Linux + 72)
96#define __NR_sigpending (__NR_Linux + 73)
97#define __NR_sethostname (__NR_Linux + 74)
98#define __NR_setrlimit (__NR_Linux + 75)
99#define __NR_getrlimit (__NR_Linux + 76)
100#define __NR_getrusage (__NR_Linux + 77)
101#define __NR_gettimeofday (__NR_Linux + 78)
102#define __NR_settimeofday (__NR_Linux + 79)
103#define __NR_getgroups (__NR_Linux + 80)
104#define __NR_setgroups (__NR_Linux + 81)
105#define __NR_reserved82 (__NR_Linux + 82)
106#define __NR_symlink (__NR_Linux + 83)
107#define __NR_unused84 (__NR_Linux + 84)
108#define __NR_readlink (__NR_Linux + 85)
109#define __NR_uselib (__NR_Linux + 86)
110#define __NR_swapon (__NR_Linux + 87)
111#define __NR_reboot (__NR_Linux + 88)
112#define __NR_readdir (__NR_Linux + 89)
113#define __NR_mmap (__NR_Linux + 90)
114#define __NR_munmap (__NR_Linux + 91)
115#define __NR_truncate (__NR_Linux + 92)
116#define __NR_ftruncate (__NR_Linux + 93)
117#define __NR_fchmod (__NR_Linux + 94)
118#define __NR_fchown (__NR_Linux + 95)
119#define __NR_getpriority (__NR_Linux + 96)
120#define __NR_setpriority (__NR_Linux + 97)
121#define __NR_profil (__NR_Linux + 98)
122#define __NR_statfs (__NR_Linux + 99)
123#define __NR_fstatfs (__NR_Linux + 100)
124#define __NR_ioperm (__NR_Linux + 101)
125#define __NR_socketcall (__NR_Linux + 102)
126#define __NR_syslog (__NR_Linux + 103)
127#define __NR_setitimer (__NR_Linux + 104)
128#define __NR_getitimer (__NR_Linux + 105)
129#define __NR_stat (__NR_Linux + 106)
130#define __NR_lstat (__NR_Linux + 107)
131#define __NR_fstat (__NR_Linux + 108)
132#define __NR_unused109 (__NR_Linux + 109)
133#define __NR_iopl (__NR_Linux + 110)
134#define __NR_vhangup (__NR_Linux + 111)
135#define __NR_idle (__NR_Linux + 112)
136#define __NR_vm86 (__NR_Linux + 113)
137#define __NR_wait4 (__NR_Linux + 114)
138#define __NR_swapoff (__NR_Linux + 115)
139#define __NR_sysinfo (__NR_Linux + 116)
140#define __NR_ipc (__NR_Linux + 117)
141#define __NR_fsync (__NR_Linux + 118)
142#define __NR_sigreturn (__NR_Linux + 119)
143#define __NR_clone (__NR_Linux + 120)
144#define __NR_setdomainname (__NR_Linux + 121)
145#define __NR_uname (__NR_Linux + 122)
146#define __NR_modify_ldt (__NR_Linux + 123)
147#define __NR_adjtimex (__NR_Linux + 124)
148#define __NR_mprotect (__NR_Linux + 125)
149#define __NR_sigprocmask (__NR_Linux + 126)
150#define __NR_create_module (__NR_Linux + 127)
151#define __NR_init_module (__NR_Linux + 128)
152#define __NR_delete_module (__NR_Linux + 129)
153#define __NR_get_kernel_syms (__NR_Linux + 130)
154#define __NR_quotactl (__NR_Linux + 131)
155#define __NR_getpgid (__NR_Linux + 132)
156#define __NR_fchdir (__NR_Linux + 133)
157#define __NR_bdflush (__NR_Linux + 134)
158#define __NR_sysfs (__NR_Linux + 135)
159#define __NR_personality (__NR_Linux + 136)
160#define __NR_afs_syscall (__NR_Linux + 137) /* Syscall for Andrew File System */
161#define __NR_setfsuid (__NR_Linux + 138)
162#define __NR_setfsgid (__NR_Linux + 139)
163#define __NR__llseek (__NR_Linux + 140)
164#define __NR_getdents (__NR_Linux + 141)
165#define __NR__newselect (__NR_Linux + 142)
166#define __NR_flock (__NR_Linux + 143)
167#define __NR_msync (__NR_Linux + 144)
168#define __NR_readv (__NR_Linux + 145)
169#define __NR_writev (__NR_Linux + 146)
170#define __NR_cacheflush (__NR_Linux + 147)
171#define __NR_cachectl (__NR_Linux + 148)
172#define __NR_sysmips (__NR_Linux + 149)
173#define __NR_unused150 (__NR_Linux + 150)
174#define __NR_getsid (__NR_Linux + 151)
175#define __NR_fdatasync (__NR_Linux + 152)
176#define __NR__sysctl (__NR_Linux + 153)
177#define __NR_mlock (__NR_Linux + 154)
178#define __NR_munlock (__NR_Linux + 155)
179#define __NR_mlockall (__NR_Linux + 156)
180#define __NR_munlockall (__NR_Linux + 157)
181#define __NR_sched_setparam (__NR_Linux + 158)
182#define __NR_sched_getparam (__NR_Linux + 159)
183#define __NR_sched_setscheduler (__NR_Linux + 160)
184#define __NR_sched_getscheduler (__NR_Linux + 161)
185#define __NR_sched_yield (__NR_Linux + 162)
186#define __NR_sched_get_priority_max (__NR_Linux + 163)
187#define __NR_sched_get_priority_min (__NR_Linux + 164)
188#define __NR_sched_rr_get_interval (__NR_Linux + 165)
189#define __NR_nanosleep (__NR_Linux + 166)
190#define __NR_mremap (__NR_Linux + 167)
191#define __NR_accept (__NR_Linux + 168)
192#define __NR_bind (__NR_Linux + 169)
193#define __NR_connect (__NR_Linux + 170)
194#define __NR_getpeername (__NR_Linux + 171)
195#define __NR_getsockname (__NR_Linux + 172)
196#define __NR_getsockopt (__NR_Linux + 173)
197#define __NR_listen (__NR_Linux + 174)
198#define __NR_recv (__NR_Linux + 175)
199#define __NR_recvfrom (__NR_Linux + 176)
200#define __NR_recvmsg (__NR_Linux + 177)
201#define __NR_send (__NR_Linux + 178)
202#define __NR_sendmsg (__NR_Linux + 179)
203#define __NR_sendto (__NR_Linux + 180)
204#define __NR_setsockopt (__NR_Linux + 181)
205#define __NR_shutdown (__NR_Linux + 182)
206#define __NR_socket (__NR_Linux + 183)
207#define __NR_socketpair (__NR_Linux + 184)
208#define __NR_setresuid (__NR_Linux + 185)
209#define __NR_getresuid (__NR_Linux + 186)
210#define __NR_query_module (__NR_Linux + 187)
211#define __NR_poll (__NR_Linux + 188)
212#define __NR_nfsservctl (__NR_Linux + 189)
213#define __NR_setresgid (__NR_Linux + 190)
214#define __NR_getresgid (__NR_Linux + 191)
215#define __NR_prctl (__NR_Linux + 192)
216#define __NR_rt_sigreturn (__NR_Linux + 193)
217#define __NR_rt_sigaction (__NR_Linux + 194)
218#define __NR_rt_sigprocmask (__NR_Linux + 195)
219#define __NR_rt_sigpending (__NR_Linux + 196)
220#define __NR_rt_sigtimedwait (__NR_Linux + 197)
221#define __NR_rt_sigqueueinfo (__NR_Linux + 198)
222#define __NR_rt_sigsuspend (__NR_Linux + 199)
223#define __NR_pread64 (__NR_Linux + 200)
224#define __NR_pwrite64 (__NR_Linux + 201)
225#define __NR_chown (__NR_Linux + 202)
226#define __NR_getcwd (__NR_Linux + 203)
227#define __NR_capget (__NR_Linux + 204)
228#define __NR_capset (__NR_Linux + 205)
229#define __NR_sigaltstack (__NR_Linux + 206)
230#define __NR_sendfile (__NR_Linux + 207)
231#define __NR_getpmsg (__NR_Linux + 208)
232#define __NR_putpmsg (__NR_Linux + 209)
233#define __NR_mmap2 (__NR_Linux + 210)
234#define __NR_truncate64 (__NR_Linux + 211)
235#define __NR_ftruncate64 (__NR_Linux + 212)
236#define __NR_stat64 (__NR_Linux + 213)
237#define __NR_lstat64 (__NR_Linux + 214)
238#define __NR_fstat64 (__NR_Linux + 215)
239#define __NR_pivot_root (__NR_Linux + 216)
240#define __NR_mincore (__NR_Linux + 217)
241#define __NR_madvise (__NR_Linux + 218)
242#define __NR_getdents64 (__NR_Linux + 219)
243#define __NR_fcntl64 (__NR_Linux + 220)
244#define __NR_reserved221 (__NR_Linux + 221)
245#define __NR_gettid (__NR_Linux + 222)
246#define __NR_readahead (__NR_Linux + 223)
247#define __NR_setxattr (__NR_Linux + 224)
248#define __NR_lsetxattr (__NR_Linux + 225)
249#define __NR_fsetxattr (__NR_Linux + 226)
250#define __NR_getxattr (__NR_Linux + 227)
251#define __NR_lgetxattr (__NR_Linux + 228)
252#define __NR_fgetxattr (__NR_Linux + 229)
253#define __NR_listxattr (__NR_Linux + 230)
254#define __NR_llistxattr (__NR_Linux + 231)
255#define __NR_flistxattr (__NR_Linux + 232)
256#define __NR_removexattr (__NR_Linux + 233)
257#define __NR_lremovexattr (__NR_Linux + 234)
258#define __NR_fremovexattr (__NR_Linux + 235)
259#define __NR_tkill (__NR_Linux + 236)
260#define __NR_sendfile64 (__NR_Linux + 237)
261#define __NR_futex (__NR_Linux + 238)
262#define __NR_sched_setaffinity (__NR_Linux + 239)
263#define __NR_sched_getaffinity (__NR_Linux + 240)
264#define __NR_io_setup (__NR_Linux + 241)
265#define __NR_io_destroy (__NR_Linux + 242)
266#define __NR_io_getevents (__NR_Linux + 243)
267#define __NR_io_submit (__NR_Linux + 244)
268#define __NR_io_cancel (__NR_Linux + 245)
269#define __NR_exit_group (__NR_Linux + 246)
270#define __NR_lookup_dcookie (__NR_Linux + 247)
271#define __NR_epoll_create (__NR_Linux + 248)
272#define __NR_epoll_ctl (__NR_Linux + 249)
273#define __NR_epoll_wait (__NR_Linux + 250)
274#define __NR_remap_file_pages (__NR_Linux + 251)
275#define __NR_set_tid_address (__NR_Linux + 252)
276#define __NR_restart_syscall (__NR_Linux + 253)
277#define __NR_fadvise64 (__NR_Linux + 254)
278#define __NR_statfs64 (__NR_Linux + 255)
279#define __NR_fstatfs64 (__NR_Linux + 256)
280#define __NR_timer_create (__NR_Linux + 257)
281#define __NR_timer_settime (__NR_Linux + 258)
282#define __NR_timer_gettime (__NR_Linux + 259)
283#define __NR_timer_getoverrun (__NR_Linux + 260)
284#define __NR_timer_delete (__NR_Linux + 261)
285#define __NR_clock_settime (__NR_Linux + 262)
286#define __NR_clock_gettime (__NR_Linux + 263)
287#define __NR_clock_getres (__NR_Linux + 264)
288#define __NR_clock_nanosleep (__NR_Linux + 265)
289#define __NR_tgkill (__NR_Linux + 266)
290#define __NR_utimes (__NR_Linux + 267)
291#define __NR_mbind (__NR_Linux + 268)
292#define __NR_get_mempolicy (__NR_Linux + 269)
293#define __NR_set_mempolicy (__NR_Linux + 270)
294#define __NR_mq_open (__NR_Linux + 271)
295#define __NR_mq_unlink (__NR_Linux + 272)
296#define __NR_mq_timedsend (__NR_Linux + 273)
297#define __NR_mq_timedreceive (__NR_Linux + 274)
298#define __NR_mq_notify (__NR_Linux + 275)
299#define __NR_mq_getsetattr (__NR_Linux + 276)
300#define __NR_vserver (__NR_Linux + 277)
301#define __NR_waitid (__NR_Linux + 278)
302/* #define __NR_sys_setaltroot (__NR_Linux + 279) */
303#define __NR_add_key (__NR_Linux + 280)
304#define __NR_request_key (__NR_Linux + 281)
305#define __NR_keyctl (__NR_Linux + 282)
306#define __NR_set_thread_area (__NR_Linux + 283)
307#define __NR_inotify_init (__NR_Linux + 284)
308#define __NR_inotify_add_watch (__NR_Linux + 285)
309#define __NR_inotify_rm_watch (__NR_Linux + 286)
310#define __NR_migrate_pages (__NR_Linux + 287)
311#define __NR_openat (__NR_Linux + 288)
312#define __NR_mkdirat (__NR_Linux + 289)
313#define __NR_mknodat (__NR_Linux + 290)
314#define __NR_fchownat (__NR_Linux + 291)
315#define __NR_futimesat (__NR_Linux + 292)
316#define __NR_fstatat64 (__NR_Linux + 293)
317#define __NR_unlinkat (__NR_Linux + 294)
318#define __NR_renameat (__NR_Linux + 295)
319#define __NR_linkat (__NR_Linux + 296)
320#define __NR_symlinkat (__NR_Linux + 297)
321#define __NR_readlinkat (__NR_Linux + 298)
322#define __NR_fchmodat (__NR_Linux + 299)
323#define __NR_faccessat (__NR_Linux + 300)
324#define __NR_pselect6 (__NR_Linux + 301)
325#define __NR_ppoll (__NR_Linux + 302)
326#define __NR_unshare (__NR_Linux + 303)
327#define __NR_splice (__NR_Linux + 304)
328#define __NR_sync_file_range (__NR_Linux + 305)
329#define __NR_tee (__NR_Linux + 306)
330#define __NR_vmsplice (__NR_Linux + 307)
331#define __NR_move_pages (__NR_Linux + 308)
332#define __NR_set_robust_list (__NR_Linux + 309)
333#define __NR_get_robust_list (__NR_Linux + 310)
334#define __NR_kexec_load (__NR_Linux + 311)
335#define __NR_getcpu (__NR_Linux + 312)
336#define __NR_epoll_pwait (__NR_Linux + 313)
337#define __NR_ioprio_set (__NR_Linux + 314)
338#define __NR_ioprio_get (__NR_Linux + 315)
339#define __NR_utimensat (__NR_Linux + 316)
340#define __NR_signalfd (__NR_Linux + 317)
341#define __NR_timerfd (__NR_Linux + 318)
342#define __NR_eventfd (__NR_Linux + 319)
343#define __NR_fallocate (__NR_Linux + 320)
344#define __NR_timerfd_create (__NR_Linux + 321)
345#define __NR_timerfd_gettime (__NR_Linux + 322)
346#define __NR_timerfd_settime (__NR_Linux + 323)
347#define __NR_signalfd4 (__NR_Linux + 324)
348#define __NR_eventfd2 (__NR_Linux + 325)
349#define __NR_epoll_create1 (__NR_Linux + 326)
350#define __NR_dup3 (__NR_Linux + 327)
351#define __NR_pipe2 (__NR_Linux + 328)
352#define __NR_inotify_init1 (__NR_Linux + 329)
353#define __NR_preadv (__NR_Linux + 330)
354#define __NR_pwritev (__NR_Linux + 331)
355#define __NR_rt_tgsigqueueinfo (__NR_Linux + 332)
356#define __NR_perf_event_open (__NR_Linux + 333)
357#define __NR_accept4 (__NR_Linux + 334)
358#define __NR_recvmmsg (__NR_Linux + 335)
359#define __NR_fanotify_init (__NR_Linux + 336)
360#define __NR_fanotify_mark (__NR_Linux + 337)
361#define __NR_prlimit64 (__NR_Linux + 338)
362#define __NR_name_to_handle_at (__NR_Linux + 339)
363#define __NR_open_by_handle_at (__NR_Linux + 340)
364#define __NR_clock_adjtime (__NR_Linux + 341)
365#define __NR_syncfs (__NR_Linux + 342)
366#define __NR_sendmmsg (__NR_Linux + 343)
367#define __NR_setns (__NR_Linux + 344)
368#define __NR_process_vm_readv (__NR_Linux + 345)
369#define __NR_process_vm_writev (__NR_Linux + 346)
370#define __NR_kcmp (__NR_Linux + 347)
371
372/*
373 * Offset of the last Linux o32 flavoured syscall
374 */
375#define __NR_Linux_syscalls 347
376
377#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
378
379#define __NR_O32_Linux 4000
380#define __NR_O32_Linux_syscalls 347
381
382#if _MIPS_SIM == _MIPS_SIM_ABI64
383
384/*
385 * Linux 64-bit syscalls are in the range from 5000 to 5999.
386 */
387#define __NR_Linux 5000
388#define __NR_read (__NR_Linux + 0)
389#define __NR_write (__NR_Linux + 1)
390#define __NR_open (__NR_Linux + 2)
391#define __NR_close (__NR_Linux + 3)
392#define __NR_stat (__NR_Linux + 4)
393#define __NR_fstat (__NR_Linux + 5)
394#define __NR_lstat (__NR_Linux + 6)
395#define __NR_poll (__NR_Linux + 7)
396#define __NR_lseek (__NR_Linux + 8)
397#define __NR_mmap (__NR_Linux + 9)
398#define __NR_mprotect (__NR_Linux + 10)
399#define __NR_munmap (__NR_Linux + 11)
400#define __NR_brk (__NR_Linux + 12)
401#define __NR_rt_sigaction (__NR_Linux + 13)
402#define __NR_rt_sigprocmask (__NR_Linux + 14)
403#define __NR_ioctl (__NR_Linux + 15)
404#define __NR_pread64 (__NR_Linux + 16)
405#define __NR_pwrite64 (__NR_Linux + 17)
406#define __NR_readv (__NR_Linux + 18)
407#define __NR_writev (__NR_Linux + 19)
408#define __NR_access (__NR_Linux + 20)
409#define __NR_pipe (__NR_Linux + 21)
410#define __NR__newselect (__NR_Linux + 22)
411#define __NR_sched_yield (__NR_Linux + 23)
412#define __NR_mremap (__NR_Linux + 24)
413#define __NR_msync (__NR_Linux + 25)
414#define __NR_mincore (__NR_Linux + 26)
415#define __NR_madvise (__NR_Linux + 27)
416#define __NR_shmget (__NR_Linux + 28)
417#define __NR_shmat (__NR_Linux + 29)
418#define __NR_shmctl (__NR_Linux + 30)
419#define __NR_dup (__NR_Linux + 31)
420#define __NR_dup2 (__NR_Linux + 32)
421#define __NR_pause (__NR_Linux + 33)
422#define __NR_nanosleep (__NR_Linux + 34)
423#define __NR_getitimer (__NR_Linux + 35)
424#define __NR_setitimer (__NR_Linux + 36)
425#define __NR_alarm (__NR_Linux + 37)
426#define __NR_getpid (__NR_Linux + 38)
427#define __NR_sendfile (__NR_Linux + 39)
428#define __NR_socket (__NR_Linux + 40)
429#define __NR_connect (__NR_Linux + 41)
430#define __NR_accept (__NR_Linux + 42)
431#define __NR_sendto (__NR_Linux + 43)
432#define __NR_recvfrom (__NR_Linux + 44)
433#define __NR_sendmsg (__NR_Linux + 45)
434#define __NR_recvmsg (__NR_Linux + 46)
435#define __NR_shutdown (__NR_Linux + 47)
436#define __NR_bind (__NR_Linux + 48)
437#define __NR_listen (__NR_Linux + 49)
438#define __NR_getsockname (__NR_Linux + 50)
439#define __NR_getpeername (__NR_Linux + 51)
440#define __NR_socketpair (__NR_Linux + 52)
441#define __NR_setsockopt (__NR_Linux + 53)
442#define __NR_getsockopt (__NR_Linux + 54)
443#define __NR_clone (__NR_Linux + 55)
444#define __NR_fork (__NR_Linux + 56)
445#define __NR_execve (__NR_Linux + 57)
446#define __NR_exit (__NR_Linux + 58)
447#define __NR_wait4 (__NR_Linux + 59)
448#define __NR_kill (__NR_Linux + 60)
449#define __NR_uname (__NR_Linux + 61)
450#define __NR_semget (__NR_Linux + 62)
451#define __NR_semop (__NR_Linux + 63)
452#define __NR_semctl (__NR_Linux + 64)
453#define __NR_shmdt (__NR_Linux + 65)
454#define __NR_msgget (__NR_Linux + 66)
455#define __NR_msgsnd (__NR_Linux + 67)
456#define __NR_msgrcv (__NR_Linux + 68)
457#define __NR_msgctl (__NR_Linux + 69)
458#define __NR_fcntl (__NR_Linux + 70)
459#define __NR_flock (__NR_Linux + 71)
460#define __NR_fsync (__NR_Linux + 72)
461#define __NR_fdatasync (__NR_Linux + 73)
462#define __NR_truncate (__NR_Linux + 74)
463#define __NR_ftruncate (__NR_Linux + 75)
464#define __NR_getdents (__NR_Linux + 76)
465#define __NR_getcwd (__NR_Linux + 77)
466#define __NR_chdir (__NR_Linux + 78)
467#define __NR_fchdir (__NR_Linux + 79)
468#define __NR_rename (__NR_Linux + 80)
469#define __NR_mkdir (__NR_Linux + 81)
470#define __NR_rmdir (__NR_Linux + 82)
471#define __NR_creat (__NR_Linux + 83)
472#define __NR_link (__NR_Linux + 84)
473#define __NR_unlink (__NR_Linux + 85)
474#define __NR_symlink (__NR_Linux + 86)
475#define __NR_readlink (__NR_Linux + 87)
476#define __NR_chmod (__NR_Linux + 88)
477#define __NR_fchmod (__NR_Linux + 89)
478#define __NR_chown (__NR_Linux + 90)
479#define __NR_fchown (__NR_Linux + 91)
480#define __NR_lchown (__NR_Linux + 92)
481#define __NR_umask (__NR_Linux + 93)
482#define __NR_gettimeofday (__NR_Linux + 94)
483#define __NR_getrlimit (__NR_Linux + 95)
484#define __NR_getrusage (__NR_Linux + 96)
485#define __NR_sysinfo (__NR_Linux + 97)
486#define __NR_times (__NR_Linux + 98)
487#define __NR_ptrace (__NR_Linux + 99)
488#define __NR_getuid (__NR_Linux + 100)
489#define __NR_syslog (__NR_Linux + 101)
490#define __NR_getgid (__NR_Linux + 102)
491#define __NR_setuid (__NR_Linux + 103)
492#define __NR_setgid (__NR_Linux + 104)
493#define __NR_geteuid (__NR_Linux + 105)
494#define __NR_getegid (__NR_Linux + 106)
495#define __NR_setpgid (__NR_Linux + 107)
496#define __NR_getppid (__NR_Linux + 108)
497#define __NR_getpgrp (__NR_Linux + 109)
498#define __NR_setsid (__NR_Linux + 110)
499#define __NR_setreuid (__NR_Linux + 111)
500#define __NR_setregid (__NR_Linux + 112)
501#define __NR_getgroups (__NR_Linux + 113)
502#define __NR_setgroups (__NR_Linux + 114)
503#define __NR_setresuid (__NR_Linux + 115)
504#define __NR_getresuid (__NR_Linux + 116)
505#define __NR_setresgid (__NR_Linux + 117)
506#define __NR_getresgid (__NR_Linux + 118)
507#define __NR_getpgid (__NR_Linux + 119)
508#define __NR_setfsuid (__NR_Linux + 120)
509#define __NR_setfsgid (__NR_Linux + 121)
510#define __NR_getsid (__NR_Linux + 122)
511#define __NR_capget (__NR_Linux + 123)
512#define __NR_capset (__NR_Linux + 124)
513#define __NR_rt_sigpending (__NR_Linux + 125)
514#define __NR_rt_sigtimedwait (__NR_Linux + 126)
515#define __NR_rt_sigqueueinfo (__NR_Linux + 127)
516#define __NR_rt_sigsuspend (__NR_Linux + 128)
517#define __NR_sigaltstack (__NR_Linux + 129)
518#define __NR_utime (__NR_Linux + 130)
519#define __NR_mknod (__NR_Linux + 131)
520#define __NR_personality (__NR_Linux + 132)
521#define __NR_ustat (__NR_Linux + 133)
522#define __NR_statfs (__NR_Linux + 134)
523#define __NR_fstatfs (__NR_Linux + 135)
524#define __NR_sysfs (__NR_Linux + 136)
525#define __NR_getpriority (__NR_Linux + 137)
526#define __NR_setpriority (__NR_Linux + 138)
527#define __NR_sched_setparam (__NR_Linux + 139)
528#define __NR_sched_getparam (__NR_Linux + 140)
529#define __NR_sched_setscheduler (__NR_Linux + 141)
530#define __NR_sched_getscheduler (__NR_Linux + 142)
531#define __NR_sched_get_priority_max (__NR_Linux + 143)
532#define __NR_sched_get_priority_min (__NR_Linux + 144)
533#define __NR_sched_rr_get_interval (__NR_Linux + 145)
534#define __NR_mlock (__NR_Linux + 146)
535#define __NR_munlock (__NR_Linux + 147)
536#define __NR_mlockall (__NR_Linux + 148)
537#define __NR_munlockall (__NR_Linux + 149)
538#define __NR_vhangup (__NR_Linux + 150)
539#define __NR_pivot_root (__NR_Linux + 151)
540#define __NR__sysctl (__NR_Linux + 152)
541#define __NR_prctl (__NR_Linux + 153)
542#define __NR_adjtimex (__NR_Linux + 154)
543#define __NR_setrlimit (__NR_Linux + 155)
544#define __NR_chroot (__NR_Linux + 156)
545#define __NR_sync (__NR_Linux + 157)
546#define __NR_acct (__NR_Linux + 158)
547#define __NR_settimeofday (__NR_Linux + 159)
548#define __NR_mount (__NR_Linux + 160)
549#define __NR_umount2 (__NR_Linux + 161)
550#define __NR_swapon (__NR_Linux + 162)
551#define __NR_swapoff (__NR_Linux + 163)
552#define __NR_reboot (__NR_Linux + 164)
553#define __NR_sethostname (__NR_Linux + 165)
554#define __NR_setdomainname (__NR_Linux + 166)
555#define __NR_create_module (__NR_Linux + 167)
556#define __NR_init_module (__NR_Linux + 168)
557#define __NR_delete_module (__NR_Linux + 169)
558#define __NR_get_kernel_syms (__NR_Linux + 170)
559#define __NR_query_module (__NR_Linux + 171)
560#define __NR_quotactl (__NR_Linux + 172)
561#define __NR_nfsservctl (__NR_Linux + 173)
562#define __NR_getpmsg (__NR_Linux + 174)
563#define __NR_putpmsg (__NR_Linux + 175)
564#define __NR_afs_syscall (__NR_Linux + 176)
565#define __NR_reserved177 (__NR_Linux + 177)
566#define __NR_gettid (__NR_Linux + 178)
567#define __NR_readahead (__NR_Linux + 179)
568#define __NR_setxattr (__NR_Linux + 180)
569#define __NR_lsetxattr (__NR_Linux + 181)
570#define __NR_fsetxattr (__NR_Linux + 182)
571#define __NR_getxattr (__NR_Linux + 183)
572#define __NR_lgetxattr (__NR_Linux + 184)
573#define __NR_fgetxattr (__NR_Linux + 185)
574#define __NR_listxattr (__NR_Linux + 186)
575#define __NR_llistxattr (__NR_Linux + 187)
576#define __NR_flistxattr (__NR_Linux + 188)
577#define __NR_removexattr (__NR_Linux + 189)
578#define __NR_lremovexattr (__NR_Linux + 190)
579#define __NR_fremovexattr (__NR_Linux + 191)
580#define __NR_tkill (__NR_Linux + 192)
581#define __NR_reserved193 (__NR_Linux + 193)
582#define __NR_futex (__NR_Linux + 194)
583#define __NR_sched_setaffinity (__NR_Linux + 195)
584#define __NR_sched_getaffinity (__NR_Linux + 196)
585#define __NR_cacheflush (__NR_Linux + 197)
586#define __NR_cachectl (__NR_Linux + 198)
587#define __NR_sysmips (__NR_Linux + 199)
588#define __NR_io_setup (__NR_Linux + 200)
589#define __NR_io_destroy (__NR_Linux + 201)
590#define __NR_io_getevents (__NR_Linux + 202)
591#define __NR_io_submit (__NR_Linux + 203)
592#define __NR_io_cancel (__NR_Linux + 204)
593#define __NR_exit_group (__NR_Linux + 205)
594#define __NR_lookup_dcookie (__NR_Linux + 206)
595#define __NR_epoll_create (__NR_Linux + 207)
596#define __NR_epoll_ctl (__NR_Linux + 208)
597#define __NR_epoll_wait (__NR_Linux + 209)
598#define __NR_remap_file_pages (__NR_Linux + 210)
599#define __NR_rt_sigreturn (__NR_Linux + 211)
600#define __NR_set_tid_address (__NR_Linux + 212)
601#define __NR_restart_syscall (__NR_Linux + 213)
602#define __NR_semtimedop (__NR_Linux + 214)
603#define __NR_fadvise64 (__NR_Linux + 215)
604#define __NR_timer_create (__NR_Linux + 216)
605#define __NR_timer_settime (__NR_Linux + 217)
606#define __NR_timer_gettime (__NR_Linux + 218)
607#define __NR_timer_getoverrun (__NR_Linux + 219)
608#define __NR_timer_delete (__NR_Linux + 220)
609#define __NR_clock_settime (__NR_Linux + 221)
610#define __NR_clock_gettime (__NR_Linux + 222)
611#define __NR_clock_getres (__NR_Linux + 223)
612#define __NR_clock_nanosleep (__NR_Linux + 224)
613#define __NR_tgkill (__NR_Linux + 225)
614#define __NR_utimes (__NR_Linux + 226)
615#define __NR_mbind (__NR_Linux + 227)
616#define __NR_get_mempolicy (__NR_Linux + 228)
617#define __NR_set_mempolicy (__NR_Linux + 229)
618#define __NR_mq_open (__NR_Linux + 230)
619#define __NR_mq_unlink (__NR_Linux + 231)
620#define __NR_mq_timedsend (__NR_Linux + 232)
621#define __NR_mq_timedreceive (__NR_Linux + 233)
622#define __NR_mq_notify (__NR_Linux + 234)
623#define __NR_mq_getsetattr (__NR_Linux + 235)
624#define __NR_vserver (__NR_Linux + 236)
625#define __NR_waitid (__NR_Linux + 237)
626/* #define __NR_sys_setaltroot (__NR_Linux + 238) */
627#define __NR_add_key (__NR_Linux + 239)
628#define __NR_request_key (__NR_Linux + 240)
629#define __NR_keyctl (__NR_Linux + 241)
630#define __NR_set_thread_area (__NR_Linux + 242)
631#define __NR_inotify_init (__NR_Linux + 243)
632#define __NR_inotify_add_watch (__NR_Linux + 244)
633#define __NR_inotify_rm_watch (__NR_Linux + 245)
634#define __NR_migrate_pages (__NR_Linux + 246)
635#define __NR_openat (__NR_Linux + 247)
636#define __NR_mkdirat (__NR_Linux + 248)
637#define __NR_mknodat (__NR_Linux + 249)
638#define __NR_fchownat (__NR_Linux + 250)
639#define __NR_futimesat (__NR_Linux + 251)
640#define __NR_newfstatat (__NR_Linux + 252)
641#define __NR_unlinkat (__NR_Linux + 253)
642#define __NR_renameat (__NR_Linux + 254)
643#define __NR_linkat (__NR_Linux + 255)
644#define __NR_symlinkat (__NR_Linux + 256)
645#define __NR_readlinkat (__NR_Linux + 257)
646#define __NR_fchmodat (__NR_Linux + 258)
647#define __NR_faccessat (__NR_Linux + 259)
648#define __NR_pselect6 (__NR_Linux + 260)
649#define __NR_ppoll (__NR_Linux + 261)
650#define __NR_unshare (__NR_Linux + 262)
651#define __NR_splice (__NR_Linux + 263)
652#define __NR_sync_file_range (__NR_Linux + 264)
653#define __NR_tee (__NR_Linux + 265)
654#define __NR_vmsplice (__NR_Linux + 266)
655#define __NR_move_pages (__NR_Linux + 267)
656#define __NR_set_robust_list (__NR_Linux + 268)
657#define __NR_get_robust_list (__NR_Linux + 269)
658#define __NR_kexec_load (__NR_Linux + 270)
659#define __NR_getcpu (__NR_Linux + 271)
660#define __NR_epoll_pwait (__NR_Linux + 272)
661#define __NR_ioprio_set (__NR_Linux + 273)
662#define __NR_ioprio_get (__NR_Linux + 274)
663#define __NR_utimensat (__NR_Linux + 275)
664#define __NR_signalfd (__NR_Linux + 276)
665#define __NR_timerfd (__NR_Linux + 277)
666#define __NR_eventfd (__NR_Linux + 278)
667#define __NR_fallocate (__NR_Linux + 279)
668#define __NR_timerfd_create (__NR_Linux + 280)
669#define __NR_timerfd_gettime (__NR_Linux + 281)
670#define __NR_timerfd_settime (__NR_Linux + 282)
671#define __NR_signalfd4 (__NR_Linux + 283)
672#define __NR_eventfd2 (__NR_Linux + 284)
673#define __NR_epoll_create1 (__NR_Linux + 285)
674#define __NR_dup3 (__NR_Linux + 286)
675#define __NR_pipe2 (__NR_Linux + 287)
676#define __NR_inotify_init1 (__NR_Linux + 288)
677#define __NR_preadv (__NR_Linux + 289)
678#define __NR_pwritev (__NR_Linux + 290)
679#define __NR_rt_tgsigqueueinfo (__NR_Linux + 291)
680#define __NR_perf_event_open (__NR_Linux + 292)
681#define __NR_accept4 (__NR_Linux + 293)
682#define __NR_recvmmsg (__NR_Linux + 294)
683#define __NR_fanotify_init (__NR_Linux + 295)
684#define __NR_fanotify_mark (__NR_Linux + 296)
685#define __NR_prlimit64 (__NR_Linux + 297)
686#define __NR_name_to_handle_at (__NR_Linux + 298)
687#define __NR_open_by_handle_at (__NR_Linux + 299)
688#define __NR_clock_adjtime (__NR_Linux + 300)
689#define __NR_syncfs (__NR_Linux + 301)
690#define __NR_sendmmsg (__NR_Linux + 302)
691#define __NR_setns (__NR_Linux + 303)
692#define __NR_process_vm_readv (__NR_Linux + 304)
693#define __NR_process_vm_writev (__NR_Linux + 305)
694#define __NR_kcmp (__NR_Linux + 306)
695
696/*
697 * Offset of the last Linux 64-bit flavoured syscall
698 */
699#define __NR_Linux_syscalls 306
700
701#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
702
703#define __NR_64_Linux 5000
704#define __NR_64_Linux_syscalls 306
705
706#if _MIPS_SIM == _MIPS_SIM_NABI32
707
708/*
709 * Linux N32 syscalls are in the range from 6000 to 6999.
710 */
711#define __NR_Linux 6000
712#define __NR_read (__NR_Linux + 0)
713#define __NR_write (__NR_Linux + 1)
714#define __NR_open (__NR_Linux + 2)
715#define __NR_close (__NR_Linux + 3)
716#define __NR_stat (__NR_Linux + 4)
717#define __NR_fstat (__NR_Linux + 5)
718#define __NR_lstat (__NR_Linux + 6)
719#define __NR_poll (__NR_Linux + 7)
720#define __NR_lseek (__NR_Linux + 8)
721#define __NR_mmap (__NR_Linux + 9)
722#define __NR_mprotect (__NR_Linux + 10)
723#define __NR_munmap (__NR_Linux + 11)
724#define __NR_brk (__NR_Linux + 12)
725#define __NR_rt_sigaction (__NR_Linux + 13)
726#define __NR_rt_sigprocmask (__NR_Linux + 14)
727#define __NR_ioctl (__NR_Linux + 15)
728#define __NR_pread64 (__NR_Linux + 16)
729#define __NR_pwrite64 (__NR_Linux + 17)
730#define __NR_readv (__NR_Linux + 18)
731#define __NR_writev (__NR_Linux + 19)
732#define __NR_access (__NR_Linux + 20)
733#define __NR_pipe (__NR_Linux + 21)
734#define __NR__newselect (__NR_Linux + 22)
735#define __NR_sched_yield (__NR_Linux + 23)
736#define __NR_mremap (__NR_Linux + 24)
737#define __NR_msync (__NR_Linux + 25)
738#define __NR_mincore (__NR_Linux + 26)
739#define __NR_madvise (__NR_Linux + 27)
740#define __NR_shmget (__NR_Linux + 28)
741#define __NR_shmat (__NR_Linux + 29)
742#define __NR_shmctl (__NR_Linux + 30)
743#define __NR_dup (__NR_Linux + 31)
744#define __NR_dup2 (__NR_Linux + 32)
745#define __NR_pause (__NR_Linux + 33)
746#define __NR_nanosleep (__NR_Linux + 34)
747#define __NR_getitimer (__NR_Linux + 35)
748#define __NR_setitimer (__NR_Linux + 36)
749#define __NR_alarm (__NR_Linux + 37)
750#define __NR_getpid (__NR_Linux + 38)
751#define __NR_sendfile (__NR_Linux + 39)
752#define __NR_socket (__NR_Linux + 40)
753#define __NR_connect (__NR_Linux + 41)
754#define __NR_accept (__NR_Linux + 42)
755#define __NR_sendto (__NR_Linux + 43)
756#define __NR_recvfrom (__NR_Linux + 44)
757#define __NR_sendmsg (__NR_Linux + 45)
758#define __NR_recvmsg (__NR_Linux + 46)
759#define __NR_shutdown (__NR_Linux + 47)
760#define __NR_bind (__NR_Linux + 48)
761#define __NR_listen (__NR_Linux + 49)
762#define __NR_getsockname (__NR_Linux + 50)
763#define __NR_getpeername (__NR_Linux + 51)
764#define __NR_socketpair (__NR_Linux + 52)
765#define __NR_setsockopt (__NR_Linux + 53)
766#define __NR_getsockopt (__NR_Linux + 54)
767#define __NR_clone (__NR_Linux + 55)
768#define __NR_fork (__NR_Linux + 56)
769#define __NR_execve (__NR_Linux + 57)
770#define __NR_exit (__NR_Linux + 58)
771#define __NR_wait4 (__NR_Linux + 59)
772#define __NR_kill (__NR_Linux + 60)
773#define __NR_uname (__NR_Linux + 61)
774#define __NR_semget (__NR_Linux + 62)
775#define __NR_semop (__NR_Linux + 63)
776#define __NR_semctl (__NR_Linux + 64)
777#define __NR_shmdt (__NR_Linux + 65)
778#define __NR_msgget (__NR_Linux + 66)
779#define __NR_msgsnd (__NR_Linux + 67)
780#define __NR_msgrcv (__NR_Linux + 68)
781#define __NR_msgctl (__NR_Linux + 69)
782#define __NR_fcntl (__NR_Linux + 70)
783#define __NR_flock (__NR_Linux + 71)
784#define __NR_fsync (__NR_Linux + 72)
785#define __NR_fdatasync (__NR_Linux + 73)
786#define __NR_truncate (__NR_Linux + 74)
787#define __NR_ftruncate (__NR_Linux + 75)
788#define __NR_getdents (__NR_Linux + 76)
789#define __NR_getcwd (__NR_Linux + 77)
790#define __NR_chdir (__NR_Linux + 78)
791#define __NR_fchdir (__NR_Linux + 79)
792#define __NR_rename (__NR_Linux + 80)
793#define __NR_mkdir (__NR_Linux + 81)
794#define __NR_rmdir (__NR_Linux + 82)
795#define __NR_creat (__NR_Linux + 83)
796#define __NR_link (__NR_Linux + 84)
797#define __NR_unlink (__NR_Linux + 85)
798#define __NR_symlink (__NR_Linux + 86)
799#define __NR_readlink (__NR_Linux + 87)
800#define __NR_chmod (__NR_Linux + 88)
801#define __NR_fchmod (__NR_Linux + 89)
802#define __NR_chown (__NR_Linux + 90)
803#define __NR_fchown (__NR_Linux + 91)
804#define __NR_lchown (__NR_Linux + 92)
805#define __NR_umask (__NR_Linux + 93)
806#define __NR_gettimeofday (__NR_Linux + 94)
807#define __NR_getrlimit (__NR_Linux + 95)
808#define __NR_getrusage (__NR_Linux + 96)
809#define __NR_sysinfo (__NR_Linux + 97)
810#define __NR_times (__NR_Linux + 98)
811#define __NR_ptrace (__NR_Linux + 99)
812#define __NR_getuid (__NR_Linux + 100)
813#define __NR_syslog (__NR_Linux + 101)
814#define __NR_getgid (__NR_Linux + 102)
815#define __NR_setuid (__NR_Linux + 103)
816#define __NR_setgid (__NR_Linux + 104)
817#define __NR_geteuid (__NR_Linux + 105)
818#define __NR_getegid (__NR_Linux + 106)
819#define __NR_setpgid (__NR_Linux + 107)
820#define __NR_getppid (__NR_Linux + 108)
821#define __NR_getpgrp (__NR_Linux + 109)
822#define __NR_setsid (__NR_Linux + 110)
823#define __NR_setreuid (__NR_Linux + 111)
824#define __NR_setregid (__NR_Linux + 112)
825#define __NR_getgroups (__NR_Linux + 113)
826#define __NR_setgroups (__NR_Linux + 114)
827#define __NR_setresuid (__NR_Linux + 115)
828#define __NR_getresuid (__NR_Linux + 116)
829#define __NR_setresgid (__NR_Linux + 117)
830#define __NR_getresgid (__NR_Linux + 118)
831#define __NR_getpgid (__NR_Linux + 119)
832#define __NR_setfsuid (__NR_Linux + 120)
833#define __NR_setfsgid (__NR_Linux + 121)
834#define __NR_getsid (__NR_Linux + 122)
835#define __NR_capget (__NR_Linux + 123)
836#define __NR_capset (__NR_Linux + 124)
837#define __NR_rt_sigpending (__NR_Linux + 125)
838#define __NR_rt_sigtimedwait (__NR_Linux + 126)
839#define __NR_rt_sigqueueinfo (__NR_Linux + 127)
840#define __NR_rt_sigsuspend (__NR_Linux + 128)
841#define __NR_sigaltstack (__NR_Linux + 129)
842#define __NR_utime (__NR_Linux + 130)
843#define __NR_mknod (__NR_Linux + 131)
844#define __NR_personality (__NR_Linux + 132)
845#define __NR_ustat (__NR_Linux + 133)
846#define __NR_statfs (__NR_Linux + 134)
847#define __NR_fstatfs (__NR_Linux + 135)
848#define __NR_sysfs (__NR_Linux + 136)
849#define __NR_getpriority (__NR_Linux + 137)
850#define __NR_setpriority (__NR_Linux + 138)
851#define __NR_sched_setparam (__NR_Linux + 139)
852#define __NR_sched_getparam (__NR_Linux + 140)
853#define __NR_sched_setscheduler (__NR_Linux + 141)
854#define __NR_sched_getscheduler (__NR_Linux + 142)
855#define __NR_sched_get_priority_max (__NR_Linux + 143)
856#define __NR_sched_get_priority_min (__NR_Linux + 144)
857#define __NR_sched_rr_get_interval (__NR_Linux + 145)
858#define __NR_mlock (__NR_Linux + 146)
859#define __NR_munlock (__NR_Linux + 147)
860#define __NR_mlockall (__NR_Linux + 148)
861#define __NR_munlockall (__NR_Linux + 149)
862#define __NR_vhangup (__NR_Linux + 150)
863#define __NR_pivot_root (__NR_Linux + 151)
864#define __NR__sysctl (__NR_Linux + 152)
865#define __NR_prctl (__NR_Linux + 153)
866#define __NR_adjtimex (__NR_Linux + 154)
867#define __NR_setrlimit (__NR_Linux + 155)
868#define __NR_chroot (__NR_Linux + 156)
869#define __NR_sync (__NR_Linux + 157)
870#define __NR_acct (__NR_Linux + 158)
871#define __NR_settimeofday (__NR_Linux + 159)
872#define __NR_mount (__NR_Linux + 160)
873#define __NR_umount2 (__NR_Linux + 161)
874#define __NR_swapon (__NR_Linux + 162)
875#define __NR_swapoff (__NR_Linux + 163)
876#define __NR_reboot (__NR_Linux + 164)
877#define __NR_sethostname (__NR_Linux + 165)
878#define __NR_setdomainname (__NR_Linux + 166)
879#define __NR_create_module (__NR_Linux + 167)
880#define __NR_init_module (__NR_Linux + 168)
881#define __NR_delete_module (__NR_Linux + 169)
882#define __NR_get_kernel_syms (__NR_Linux + 170)
883#define __NR_query_module (__NR_Linux + 171)
884#define __NR_quotactl (__NR_Linux + 172)
885#define __NR_nfsservctl (__NR_Linux + 173)
886#define __NR_getpmsg (__NR_Linux + 174)
887#define __NR_putpmsg (__NR_Linux + 175)
888#define __NR_afs_syscall (__NR_Linux + 176)
889#define __NR_reserved177 (__NR_Linux + 177)
890#define __NR_gettid (__NR_Linux + 178)
891#define __NR_readahead (__NR_Linux + 179)
892#define __NR_setxattr (__NR_Linux + 180)
893#define __NR_lsetxattr (__NR_Linux + 181)
894#define __NR_fsetxattr (__NR_Linux + 182)
895#define __NR_getxattr (__NR_Linux + 183)
896#define __NR_lgetxattr (__NR_Linux + 184)
897#define __NR_fgetxattr (__NR_Linux + 185)
898#define __NR_listxattr (__NR_Linux + 186)
899#define __NR_llistxattr (__NR_Linux + 187)
900#define __NR_flistxattr (__NR_Linux + 188)
901#define __NR_removexattr (__NR_Linux + 189)
902#define __NR_lremovexattr (__NR_Linux + 190)
903#define __NR_fremovexattr (__NR_Linux + 191)
904#define __NR_tkill (__NR_Linux + 192)
905#define __NR_reserved193 (__NR_Linux + 193)
906#define __NR_futex (__NR_Linux + 194)
907#define __NR_sched_setaffinity (__NR_Linux + 195)
908#define __NR_sched_getaffinity (__NR_Linux + 196)
909#define __NR_cacheflush (__NR_Linux + 197)
910#define __NR_cachectl (__NR_Linux + 198)
911#define __NR_sysmips (__NR_Linux + 199)
912#define __NR_io_setup (__NR_Linux + 200)
913#define __NR_io_destroy (__NR_Linux + 201)
914#define __NR_io_getevents (__NR_Linux + 202)
915#define __NR_io_submit (__NR_Linux + 203)
916#define __NR_io_cancel (__NR_Linux + 204)
917#define __NR_exit_group (__NR_Linux + 205)
918#define __NR_lookup_dcookie (__NR_Linux + 206)
919#define __NR_epoll_create (__NR_Linux + 207)
920#define __NR_epoll_ctl (__NR_Linux + 208)
921#define __NR_epoll_wait (__NR_Linux + 209)
922#define __NR_remap_file_pages (__NR_Linux + 210)
923#define __NR_rt_sigreturn (__NR_Linux + 211)
924#define __NR_fcntl64 (__NR_Linux + 212)
925#define __NR_set_tid_address (__NR_Linux + 213)
926#define __NR_restart_syscall (__NR_Linux + 214)
927#define __NR_semtimedop (__NR_Linux + 215)
928#define __NR_fadvise64 (__NR_Linux + 216)
929#define __NR_statfs64 (__NR_Linux + 217)
930#define __NR_fstatfs64 (__NR_Linux + 218)
931#define __NR_sendfile64 (__NR_Linux + 219)
932#define __NR_timer_create (__NR_Linux + 220)
933#define __NR_timer_settime (__NR_Linux + 221)
934#define __NR_timer_gettime (__NR_Linux + 222)
935#define __NR_timer_getoverrun (__NR_Linux + 223)
936#define __NR_timer_delete (__NR_Linux + 224)
937#define __NR_clock_settime (__NR_Linux + 225)
938#define __NR_clock_gettime (__NR_Linux + 226)
939#define __NR_clock_getres (__NR_Linux + 227)
940#define __NR_clock_nanosleep (__NR_Linux + 228)
941#define __NR_tgkill (__NR_Linux + 229)
942#define __NR_utimes (__NR_Linux + 230)
943#define __NR_mbind (__NR_Linux + 231)
944#define __NR_get_mempolicy (__NR_Linux + 232)
945#define __NR_set_mempolicy (__NR_Linux + 233)
946#define __NR_mq_open (__NR_Linux + 234)
947#define __NR_mq_unlink (__NR_Linux + 235)
948#define __NR_mq_timedsend (__NR_Linux + 236)
949#define __NR_mq_timedreceive (__NR_Linux + 237)
950#define __NR_mq_notify (__NR_Linux + 238)
951#define __NR_mq_getsetattr (__NR_Linux + 239)
952#define __NR_vserver (__NR_Linux + 240)
953#define __NR_waitid (__NR_Linux + 241)
954/* #define __NR_sys_setaltroot (__NR_Linux + 242) */
955#define __NR_add_key (__NR_Linux + 243)
956#define __NR_request_key (__NR_Linux + 244)
957#define __NR_keyctl (__NR_Linux + 245)
958#define __NR_set_thread_area (__NR_Linux + 246)
959#define __NR_inotify_init (__NR_Linux + 247)
960#define __NR_inotify_add_watch (__NR_Linux + 248)
961#define __NR_inotify_rm_watch (__NR_Linux + 249)
962#define __NR_migrate_pages (__NR_Linux + 250)
963#define __NR_openat (__NR_Linux + 251)
964#define __NR_mkdirat (__NR_Linux + 252)
965#define __NR_mknodat (__NR_Linux + 253)
966#define __NR_fchownat (__NR_Linux + 254)
967#define __NR_futimesat (__NR_Linux + 255)
968#define __NR_newfstatat (__NR_Linux + 256)
969#define __NR_unlinkat (__NR_Linux + 257)
970#define __NR_renameat (__NR_Linux + 258)
971#define __NR_linkat (__NR_Linux + 259)
972#define __NR_symlinkat (__NR_Linux + 260)
973#define __NR_readlinkat (__NR_Linux + 261)
974#define __NR_fchmodat (__NR_Linux + 262)
975#define __NR_faccessat (__NR_Linux + 263)
976#define __NR_pselect6 (__NR_Linux + 264)
977#define __NR_ppoll (__NR_Linux + 265)
978#define __NR_unshare (__NR_Linux + 266)
979#define __NR_splice (__NR_Linux + 267)
980#define __NR_sync_file_range (__NR_Linux + 268)
981#define __NR_tee (__NR_Linux + 269)
982#define __NR_vmsplice (__NR_Linux + 270)
983#define __NR_move_pages (__NR_Linux + 271)
984#define __NR_set_robust_list (__NR_Linux + 272)
985#define __NR_get_robust_list (__NR_Linux + 273)
986#define __NR_kexec_load (__NR_Linux + 274)
987#define __NR_getcpu (__NR_Linux + 275)
988#define __NR_epoll_pwait (__NR_Linux + 276)
989#define __NR_ioprio_set (__NR_Linux + 277)
990#define __NR_ioprio_get (__NR_Linux + 278)
991#define __NR_utimensat (__NR_Linux + 279)
992#define __NR_signalfd (__NR_Linux + 280)
993#define __NR_timerfd (__NR_Linux + 281)
994#define __NR_eventfd (__NR_Linux + 282)
995#define __NR_fallocate (__NR_Linux + 283)
996#define __NR_timerfd_create (__NR_Linux + 284)
997#define __NR_timerfd_gettime (__NR_Linux + 285)
998#define __NR_timerfd_settime (__NR_Linux + 286)
999#define __NR_signalfd4 (__NR_Linux + 287)
1000#define __NR_eventfd2 (__NR_Linux + 288)
1001#define __NR_epoll_create1 (__NR_Linux + 289)
1002#define __NR_dup3 (__NR_Linux + 290)
1003#define __NR_pipe2 (__NR_Linux + 291)
1004#define __NR_inotify_init1 (__NR_Linux + 292)
1005#define __NR_preadv (__NR_Linux + 293)
1006#define __NR_pwritev (__NR_Linux + 294)
1007#define __NR_rt_tgsigqueueinfo (__NR_Linux + 295)
1008#define __NR_perf_event_open (__NR_Linux + 296)
1009#define __NR_accept4 (__NR_Linux + 297)
1010#define __NR_recvmmsg (__NR_Linux + 298)
1011#define __NR_getdents64 (__NR_Linux + 299)
1012#define __NR_fanotify_init (__NR_Linux + 300)
1013#define __NR_fanotify_mark (__NR_Linux + 301)
1014#define __NR_prlimit64 (__NR_Linux + 302)
1015#define __NR_name_to_handle_at (__NR_Linux + 303)
1016#define __NR_open_by_handle_at (__NR_Linux + 304)
1017#define __NR_clock_adjtime (__NR_Linux + 305)
1018#define __NR_syncfs (__NR_Linux + 306)
1019#define __NR_sendmmsg (__NR_Linux + 307)
1020#define __NR_setns (__NR_Linux + 308)
1021#define __NR_process_vm_readv (__NR_Linux + 309)
1022#define __NR_process_vm_writev (__NR_Linux + 310)
1023#define __NR_kcmp (__NR_Linux + 311)
1024
1025/*
1026 * Offset of the last N32 flavoured syscall
1027 */
1028#define __NR_Linux_syscalls 311
1029
1030#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
1031
1032#define __NR_N32_Linux 6000
1033#define __NR_N32_Linux_syscalls 311
1034
1035#endif /* _UAPI_ASM_UNISTD_H */