aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/include/uapi
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-11-10 18:32:51 -0500
committerDavid S. Miller <davem@davemloft.net>2012-11-10 18:32:51 -0500
commitd4185bbf62a5d8d777ee445db1581beb17882a07 (patch)
tree024b0badbd7c970b1983be6d8c345cc4a290cb31 /arch/xtensa/include/uapi
parentc075b13098b399dc565b4d53f42047a8d40ed3ba (diff)
parenta375413311b39005ef281bfd71ae8f4e3df22e97 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c Minor conflict between the BCM_CNIC define removal in net-next and a bug fix added to net. Based upon a conflict resolution patch posted by Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/xtensa/include/uapi')
-rw-r--r--arch/xtensa/include/uapi/asm/Kbuild22
-rw-r--r--arch/xtensa/include/uapi/asm/auxvec.h4
-rw-r--r--arch/xtensa/include/uapi/asm/byteorder.h12
-rw-r--r--arch/xtensa/include/uapi/asm/ioctls.h120
-rw-r--r--arch/xtensa/include/uapi/asm/ipcbuf.h37
-rw-r--r--arch/xtensa/include/uapi/asm/mman.h96
-rw-r--r--arch/xtensa/include/uapi/asm/msgbuf.h48
-rw-r--r--arch/xtensa/include/uapi/asm/param.h30
-rw-r--r--arch/xtensa/include/uapi/asm/poll.h20
-rw-r--r--arch/xtensa/include/uapi/asm/posix_types.h39
-rw-r--r--arch/xtensa/include/uapi/asm/ptrace.h77
-rw-r--r--arch/xtensa/include/uapi/asm/sembuf.h44
-rw-r--r--arch/xtensa/include/uapi/asm/setup.h18
-rw-r--r--arch/xtensa/include/uapi/asm/shmbuf.h71
-rw-r--r--arch/xtensa/include/uapi/asm/sigcontext.h28
-rw-r--r--arch/xtensa/include/uapi/asm/signal.h148
-rw-r--r--arch/xtensa/include/uapi/asm/socket.h84
-rw-r--r--arch/xtensa/include/uapi/asm/sockios.h31
-rw-r--r--arch/xtensa/include/uapi/asm/stat.h59
-rw-r--r--arch/xtensa/include/uapi/asm/swab.h70
-rw-r--r--arch/xtensa/include/uapi/asm/termbits.h220
-rw-r--r--arch/xtensa/include/uapi/asm/types.h28
-rw-r--r--arch/xtensa/include/uapi/asm/unistd.h754
23 files changed, 2060 insertions, 0 deletions
diff --git a/arch/xtensa/include/uapi/asm/Kbuild b/arch/xtensa/include/uapi/asm/Kbuild
index baebb3da1d44..56aad54e7fb7 100644
--- a/arch/xtensa/include/uapi/asm/Kbuild
+++ b/arch/xtensa/include/uapi/asm/Kbuild
@@ -1,3 +1,25 @@
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 += byteorder.h
6header-y += ioctls.h
7header-y += ipcbuf.h
8header-y += mman.h
9header-y += msgbuf.h
10header-y += param.h
11header-y += poll.h
12header-y += posix_types.h
13header-y += ptrace.h
14header-y += sembuf.h
15header-y += setup.h
16header-y += shmbuf.h
17header-y += sigcontext.h
18header-y += signal.h
19header-y += socket.h
20header-y += sockios.h
21header-y += stat.h
22header-y += swab.h
23header-y += termbits.h
24header-y += types.h
25header-y += unistd.h
diff --git a/arch/xtensa/include/uapi/asm/auxvec.h b/arch/xtensa/include/uapi/asm/auxvec.h
new file mode 100644
index 000000000000..257dec75c5af
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/auxvec.h
@@ -0,0 +1,4 @@
1#ifndef __XTENSA_AUXVEC_H
2#define __XTENSA_AUXVEC_H
3
4#endif
diff --git a/arch/xtensa/include/uapi/asm/byteorder.h b/arch/xtensa/include/uapi/asm/byteorder.h
new file mode 100644
index 000000000000..54eb6315349c
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/byteorder.h
@@ -0,0 +1,12 @@
1#ifndef _XTENSA_BYTEORDER_H
2#define _XTENSA_BYTEORDER_H
3
4#ifdef __XTENSA_EL__
5#include <linux/byteorder/little_endian.h>
6#elif defined(__XTENSA_EB__)
7#include <linux/byteorder/big_endian.h>
8#else
9# error processor byte order undefined!
10#endif
11
12#endif /* _XTENSA_BYTEORDER_H */
diff --git a/arch/xtensa/include/uapi/asm/ioctls.h b/arch/xtensa/include/uapi/asm/ioctls.h
new file mode 100644
index 000000000000..2aa4cd9f0cec
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/ioctls.h
@@ -0,0 +1,120 @@
1/*
2 * include/asm-xtensa/ioctls.h
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) 2003 - 2005 Tensilica Inc.
9 *
10 * Derived from "include/asm-i386/ioctls.h"
11 */
12
13#ifndef _XTENSA_IOCTLS_H
14#define _XTENSA_IOCTLS_H
15
16#include <asm/ioctl.h>
17
18#define FIOCLEX _IO('f', 1)
19#define FIONCLEX _IO('f', 2)
20#define FIOASYNC _IOW('f', 125, int)
21#define FIONBIO _IOW('f', 126, int)
22#define FIONREAD _IOR('f', 127, int)
23#define TIOCINQ FIONREAD
24#define FIOQSIZE _IOR('f', 128, loff_t)
25
26#define TCGETS 0x5401
27#define TCSETS 0x5402
28#define TCSETSW 0x5403
29#define TCSETSF 0x5404
30
31#define TCGETA _IOR('t', 23, struct termio)
32#define TCSETA _IOW('t', 24, struct termio)
33#define TCSETAW _IOW('t', 25, struct termio)
34#define TCSETAF _IOW('t', 28, struct termio)
35
36#define TCSBRK _IO('t', 29)
37#define TCXONC _IO('t', 30)
38#define TCFLSH _IO('t', 31)
39
40#define TIOCSWINSZ _IOW('t', 103, struct winsize)
41#define TIOCGWINSZ _IOR('t', 104, struct winsize)
42#define TIOCSTART _IO('t', 110) /* start output, like ^Q */
43#define TIOCSTOP _IO('t', 111) /* stop output, like ^S */
44#define TIOCOUTQ _IOR('t', 115, int) /* output queue size */
45
46#define TIOCSPGRP _IOW('t', 118, int)
47#define TIOCGPGRP _IOR('t', 119, int)
48
49#define TIOCEXCL _IO('T', 12)
50#define TIOCNXCL _IO('T', 13)
51#define TIOCSCTTY _IO('T', 14)
52
53#define TIOCSTI _IOW('T', 18, char)
54#define TIOCMGET _IOR('T', 21, unsigned int)
55#define TIOCMBIS _IOW('T', 22, unsigned int)
56#define TIOCMBIC _IOW('T', 23, unsigned int)
57#define TIOCMSET _IOW('T', 24, unsigned int)
58# define TIOCM_LE 0x001
59# define TIOCM_DTR 0x002
60# define TIOCM_RTS 0x004
61# define TIOCM_ST 0x008
62# define TIOCM_SR 0x010
63# define TIOCM_CTS 0x020
64# define TIOCM_CAR 0x040
65# define TIOCM_RNG 0x080
66# define TIOCM_DSR 0x100
67# define TIOCM_CD TIOCM_CAR
68# define TIOCM_RI TIOCM_RNG
69
70#define TIOCGSOFTCAR _IOR('T', 25, unsigned int)
71#define TIOCSSOFTCAR _IOW('T', 26, unsigned int)
72#define TIOCLINUX _IOW('T', 28, char)
73#define TIOCCONS _IO('T', 29)
74#define TIOCGSERIAL 0x803C541E /*_IOR('T', 30, struct serial_struct)*/
75#define TIOCSSERIAL 0x403C541F /*_IOW('T', 31, struct serial_struct)*/
76#define TIOCPKT _IOW('T', 32, int)
77# define TIOCPKT_DATA 0
78# define TIOCPKT_FLUSHREAD 1
79# define TIOCPKT_FLUSHWRITE 2
80# define TIOCPKT_STOP 4
81# define TIOCPKT_START 8
82# define TIOCPKT_NOSTOP 16
83# define TIOCPKT_DOSTOP 32
84# define TIOCPKT_IOCTL 64
85
86
87#define TIOCNOTTY _IO('T', 34)
88#define TIOCSETD _IOW('T', 35, int)
89#define TIOCGETD _IOR('T', 36, int)
90#define TCSBRKP _IOW('T', 37, int) /* Needed for POSIX tcsendbreak()*/
91#define TIOCTTYGSTRUCT _IOR('T', 38, struct tty_struct) /* For debugging only*/
92#define TIOCSBRK _IO('T', 39) /* BSD compatibility */
93#define TIOCCBRK _IO('T', 40) /* BSD compatibility */
94#define TIOCGSID _IOR('T', 41, pid_t) /* Return the session ID of FD*/
95#define TCGETS2 _IOR('T', 42, struct termios2)
96#define TCSETS2 _IOW('T', 43, struct termios2)
97#define TCSETSW2 _IOW('T', 44, struct termios2)
98#define TCSETSF2 _IOW('T', 45, struct termios2)
99#define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
100#define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */
101#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */
102#define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */
103#define TIOCVHANGUP _IO('T', 0x37)
104
105#define TIOCSERCONFIG _IO('T', 83)
106#define TIOCSERGWILD _IOR('T', 84, int)
107#define TIOCSERSWILD _IOW('T', 85, int)
108#define TIOCGLCKTRMIOS 0x5456
109#define TIOCSLCKTRMIOS 0x5457
110#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
111#define TIOCSERGETLSR _IOR('T', 89, unsigned int) /* Get line status reg. */
112 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
113# define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
114#define TIOCSERGETMULTI _IOR('T', 90, struct serial_multiport_struct) /* Get multiport config */
115#define TIOCSERSETMULTI _IOW('T', 91, struct serial_multiport_struct) /* Set multiport config */
116
117#define TIOCMIWAIT _IO('T', 92) /* wait for a change on serial input line(s) */
118#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
119
120#endif /* _XTENSA_IOCTLS_H */
diff --git a/arch/xtensa/include/uapi/asm/ipcbuf.h b/arch/xtensa/include/uapi/asm/ipcbuf.h
new file mode 100644
index 000000000000..c33aa6a42145
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/ipcbuf.h
@@ -0,0 +1,37 @@
1/*
2 * include/asm-xtensa/ipcbuf.h
3 *
4 * The ipc64_perm structure for the Xtensa architecture.
5 * Note extra padding because this structure is passed back and forth
6 * between kernel and user space.
7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_IPCBUF_H
12#define _XTENSA_IPCBUF_H
13
14/*
15 * Pad space is left for:
16 * - 32-bit mode_t and seq
17 * - 2 miscellaneous 32-bit values
18 *
19 * This file is subject to the terms and conditions of the GNU General
20 * Public License. See the file "COPYING" in the main directory of
21 * this archive for more details.
22 */
23
24struct ipc64_perm
25{
26 __kernel_key_t key;
27 __kernel_uid32_t uid;
28 __kernel_gid32_t gid;
29 __kernel_uid32_t cuid;
30 __kernel_gid32_t cgid;
31 __kernel_mode_t mode;
32 unsigned long seq;
33 unsigned long __unused1;
34 unsigned long __unused2;
35};
36
37#endif /* _XTENSA_IPCBUF_H */
diff --git a/arch/xtensa/include/uapi/asm/mman.h b/arch/xtensa/include/uapi/asm/mman.h
new file mode 100644
index 000000000000..25bc6c1309c3
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/mman.h
@@ -0,0 +1,96 @@
1/*
2 * include/asm-xtensa/mman.h
3 *
4 * Xtensa Processor memory-manager definitions
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 *
10 * Copyright (C) 1995 by Ralf Baechle
11 * Copyright (C) 2001 - 2005 Tensilica Inc.
12 */
13
14#ifndef _XTENSA_MMAN_H
15#define _XTENSA_MMAN_H
16
17/*
18 * Protections are chosen from these bits, OR'd together. The
19 * implementation does not necessarily support PROT_EXEC or PROT_WRITE
20 * without PROT_READ. The only guarantees are that no writing will be
21 * allowed without PROT_WRITE and no access will be allowed for PROT_NONE.
22 */
23
24#define PROT_NONE 0x0 /* page can not be accessed */
25#define PROT_READ 0x1 /* page can be read */
26#define PROT_WRITE 0x2 /* page can be written */
27#define PROT_EXEC 0x4 /* page can be executed */
28
29#define PROT_SEM 0x10 /* page may be used for atomic ops */
30#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
31#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end fo growsup vma */
32
33/*
34 * Flags for mmap
35 */
36#define MAP_SHARED 0x001 /* Share changes */
37#define MAP_PRIVATE 0x002 /* Changes are private */
38#define MAP_TYPE 0x00f /* Mask for type of mapping */
39#define MAP_FIXED 0x010 /* Interpret addr exactly */
40
41/* not used by linux, but here to make sure we don't clash with ABI defines */
42#define MAP_RENAME 0x020 /* Assign page to file */
43#define MAP_AUTOGROW 0x040 /* File may grow by writing */
44#define MAP_LOCAL 0x080 /* Copy on fork/sproc */
45#define MAP_AUTORSRV 0x100 /* Logical swap reserved on demand */
46
47/* These are linux-specific */
48#define MAP_NORESERVE 0x0400 /* don't check for reservations */
49#define MAP_ANONYMOUS 0x0800 /* don't use a file */
50#define MAP_GROWSDOWN 0x1000 /* stack-like segment */
51#define MAP_DENYWRITE 0x2000 /* ETXTBSY */
52#define MAP_EXECUTABLE 0x4000 /* mark it as an executable */
53#define MAP_LOCKED 0x8000 /* pages are locked */
54#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */
55#define MAP_NONBLOCK 0x20000 /* do not block on IO */
56#define MAP_STACK 0x40000 /* give out an address that is best suited for process/thread stacks */
57#define MAP_HUGETLB 0x80000 /* create a huge page mapping */
58
59/*
60 * Flags for msync
61 */
62#define MS_ASYNC 0x0001 /* sync memory asynchronously */
63#define MS_INVALIDATE 0x0002 /* invalidate mappings & caches */
64#define MS_SYNC 0x0004 /* synchronous memory sync */
65
66/*
67 * Flags for mlockall
68 */
69#define MCL_CURRENT 1 /* lock all current mappings */
70#define MCL_FUTURE 2 /* lock all future mappings */
71
72#define MADV_NORMAL 0 /* no further special treatment */
73#define MADV_RANDOM 1 /* expect random page references */
74#define MADV_SEQUENTIAL 2 /* expect sequential page references */
75#define MADV_WILLNEED 3 /* will need these pages */
76#define MADV_DONTNEED 4 /* don't need these pages */
77
78/* common parameters: try to keep these consistent across architectures */
79#define MADV_REMOVE 9 /* remove these pages & resources */
80#define MADV_DONTFORK 10 /* don't inherit across fork */
81#define MADV_DOFORK 11 /* do inherit across fork */
82
83#define MADV_MERGEABLE 12 /* KSM may merge identical pages */
84#define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages */
85
86#define MADV_HUGEPAGE 14 /* Worth backing with hugepages */
87#define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages */
88
89#define MADV_DONTDUMP 16 /* Explicity exclude from the core dump,
90 overrides the coredump filter bits */
91#define MADV_DODUMP 17 /* Clear the MADV_NODUMP flag */
92
93/* compatibility flags */
94#define MAP_FILE 0
95
96#endif /* _XTENSA_MMAN_H */
diff --git a/arch/xtensa/include/uapi/asm/msgbuf.h b/arch/xtensa/include/uapi/asm/msgbuf.h
new file mode 100644
index 000000000000..693c96755280
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/msgbuf.h
@@ -0,0 +1,48 @@
1/*
2 * include/asm-xtensa/msgbuf.h
3 *
4 * The msqid64_ds structure for the Xtensa architecture.
5 * Note extra padding because this structure is passed back and forth
6 * between kernel and user space.
7 *
8 * Pad space is left for:
9 * - 64-bit time_t to solve y2038 problem
10 * - 2 miscellaneous 32-bit values
11 *
12 * This file is subject to the terms and conditions of the GNU General
13 * Public License. See the file "COPYING" in the main directory of
14 * this archive for more details.
15 */
16
17#ifndef _XTENSA_MSGBUF_H
18#define _XTENSA_MSGBUF_H
19
20struct msqid64_ds {
21 struct ipc64_perm msg_perm;
22#ifdef __XTENSA_EB__
23 unsigned int __unused1;
24 __kernel_time_t msg_stime; /* last msgsnd time */
25 unsigned int __unused2;
26 __kernel_time_t msg_rtime; /* last msgrcv time */
27 unsigned int __unused3;
28 __kernel_time_t msg_ctime; /* last change time */
29#elif defined(__XTENSA_EL__)
30 __kernel_time_t msg_stime; /* last msgsnd time */
31 unsigned int __unused1;
32 __kernel_time_t msg_rtime; /* last msgrcv time */
33 unsigned int __unused2;
34 __kernel_time_t msg_ctime; /* last change time */
35 unsigned int __unused3;
36#else
37# error processor byte order undefined!
38#endif
39 unsigned long msg_cbytes; /* current number of bytes on queue */
40 unsigned long msg_qnum; /* number of messages in queue */
41 unsigned long msg_qbytes; /* max number of bytes on queue */
42 __kernel_pid_t msg_lspid; /* pid of last msgsnd */
43 __kernel_pid_t msg_lrpid; /* last receive pid */
44 unsigned long __unused4;
45 unsigned long __unused5;
46};
47
48#endif /* _XTENSA_MSGBUF_H */
diff --git a/arch/xtensa/include/uapi/asm/param.h b/arch/xtensa/include/uapi/asm/param.h
new file mode 100644
index 000000000000..87bc2eae630e
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/param.h
@@ -0,0 +1,30 @@
1/*
2 * include/asm-xtensa/param.h
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) 2001 - 2005 Tensilica Inc.
9 */
10
11#ifndef _UAPI_XTENSA_PARAM_H
12#define _UAPI_XTENSA_PARAM_H
13
14#ifndef __KERNEL__
15# define HZ 100
16#endif
17
18#define EXEC_PAGESIZE 4096
19
20#ifndef NGROUPS
21#define NGROUPS 32
22#endif
23
24#ifndef NOGROUP
25#define NOGROUP (-1)
26#endif
27
28#define MAXHOSTNAMELEN 64 /* max length of hostname */
29
30#endif /* _UAPI_XTENSA_PARAM_H */
diff --git a/arch/xtensa/include/uapi/asm/poll.h b/arch/xtensa/include/uapi/asm/poll.h
new file mode 100644
index 000000000000..9d2d5993f068
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/poll.h
@@ -0,0 +1,20 @@
1/*
2 * include/asm-xtensa/poll.h
3 *
4 * This file is subject to the terms and conditions of the GNU General
5 * Public License. See the file "COPYING" in the main directory of
6 * this archive for more details.
7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_POLL_H
12#define _XTENSA_POLL_H
13
14#define POLLWRNORM POLLOUT
15#define POLLWRBAND 0x0100
16#define POLLREMOVE 0x0800
17
18#include <asm-generic/poll.h>
19
20#endif /* _XTENSA_POLL_H */
diff --git a/arch/xtensa/include/uapi/asm/posix_types.h b/arch/xtensa/include/uapi/asm/posix_types.h
new file mode 100644
index 000000000000..6e96be0d02d3
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/posix_types.h
@@ -0,0 +1,39 @@
1/*
2 * include/asm-xtensa/posix_types.h
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 * Largely copied from include/asm-ppc/posix_types.h
9 *
10 * Copyright (C) 2001 - 2005 Tensilica Inc.
11 */
12
13#ifndef _XTENSA_POSIX_TYPES_H
14#define _XTENSA_POSIX_TYPES_H
15
16/*
17 * This file is generally used by user-level software, so you need to
18 * be a little careful about namespace pollution etc. Also, we cannot
19 * assume GCC is being used.
20 */
21
22typedef unsigned short __kernel_ipc_pid_t;
23#define __kernel_ipc_pid_t __kernel_ipc_pid_t
24
25typedef unsigned int __kernel_size_t;
26typedef int __kernel_ssize_t;
27typedef long __kernel_ptrdiff_t;
28#define __kernel_size_t __kernel_size_t
29
30typedef unsigned short __kernel_old_uid_t;
31typedef unsigned short __kernel_old_gid_t;
32#define __kernel_old_uid_t __kernel_old_uid_t
33
34typedef unsigned short __kernel_old_dev_t;
35#define __kernel_old_dev_t __kernel_old_dev_t
36
37#include <asm-generic/posix_types.h>
38
39#endif /* _XTENSA_POSIX_TYPES_H */
diff --git a/arch/xtensa/include/uapi/asm/ptrace.h b/arch/xtensa/include/uapi/asm/ptrace.h
new file mode 100644
index 000000000000..ee17aa842fdf
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/ptrace.h
@@ -0,0 +1,77 @@
1/*
2 * include/asm-xtensa/ptrace.h
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) 2001 - 2005 Tensilica Inc.
9 */
10
11#ifndef _UAPI_XTENSA_PTRACE_H
12#define _UAPI_XTENSA_PTRACE_H
13
14/*
15 * Kernel stack
16 *
17 * +-----------------------+ -------- STACK_SIZE
18 * | register file | |
19 * +-----------------------+ |
20 * | struct pt_regs | |
21 * +-----------------------+ | ------ PT_REGS_OFFSET
22 * double : 16 bytes spill area : | ^
23 * excetion :- - - - - - - - - - - -: | |
24 * frame : struct pt_regs : | |
25 * :- - - - - - - - - - - -: | |
26 * | | | |
27 * | memory stack | | |
28 * | | | |
29 * ~ ~ ~ ~
30 * ~ ~ ~ ~
31 * | | | |
32 * | | | |
33 * +-----------------------+ | | --- STACK_BIAS
34 * | struct task_struct | | | ^
35 * current --> +-----------------------+ | | |
36 * | struct thread_info | | | |
37 * +-----------------------+ --------
38 */
39
40#define KERNEL_STACK_SIZE (2 * PAGE_SIZE)
41
42/* Offsets for exception_handlers[] (3 x 64-entries x 4-byte tables). */
43
44#define EXC_TABLE_KSTK 0x004 /* Kernel Stack */
45#define EXC_TABLE_DOUBLE_SAVE 0x008 /* Double exception save area for a0 */
46#define EXC_TABLE_FIXUP 0x00c /* Fixup handler */
47#define EXC_TABLE_PARAM 0x010 /* For passing a parameter to fixup */
48#define EXC_TABLE_SYSCALL_SAVE 0x014 /* For fast syscall handler */
49#define EXC_TABLE_FAST_USER 0x100 /* Fast user exception handler */
50#define EXC_TABLE_FAST_KERNEL 0x200 /* Fast kernel exception handler */
51#define EXC_TABLE_DEFAULT 0x300 /* Default C-Handler */
52#define EXC_TABLE_SIZE 0x400
53
54/* Registers used by strace */
55
56#define REG_A_BASE 0x0000
57#define REG_AR_BASE 0x0100
58#define REG_PC 0x0020
59#define REG_PS 0x02e6
60#define REG_WB 0x0248
61#define REG_WS 0x0249
62#define REG_LBEG 0x0200
63#define REG_LEND 0x0201
64#define REG_LCOUNT 0x0202
65#define REG_SAR 0x0203
66
67#define SYSCALL_NR 0x00ff
68
69/* Other PTRACE_ values defined in <linux/ptrace.h> using values 0-9,16,17,24 */
70
71#define PTRACE_GETREGS 12
72#define PTRACE_SETREGS 13
73#define PTRACE_GETXTREGS 18
74#define PTRACE_SETXTREGS 19
75
76
77#endif /* _UAPI_XTENSA_PTRACE_H */
diff --git a/arch/xtensa/include/uapi/asm/sembuf.h b/arch/xtensa/include/uapi/asm/sembuf.h
new file mode 100644
index 000000000000..c15870493b33
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/sembuf.h
@@ -0,0 +1,44 @@
1/*
2 * include/asm-xtensa/sembuf.h
3 *
4 * The semid64_ds structure for Xtensa architecture.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 *
10 * Copyright (C) 2001 - 2005 Tensilica Inc.
11 *
12 * Note extra padding because this structure is passed back and forth
13 * between kernel and user space.
14 *
15 * Pad space is left for:
16 * - 64-bit time_t to solve y2038 problem
17 * - 2 miscellaneous 32-bit values
18 *
19 */
20
21#ifndef _XTENSA_SEMBUF_H
22#define _XTENSA_SEMBUF_H
23
24#include <asm/byteorder.h>
25
26struct semid64_ds {
27 struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
28#ifdef __XTENSA_EL__
29 __kernel_time_t sem_otime; /* last semop time */
30 unsigned long __unused1;
31 __kernel_time_t sem_ctime; /* last change time */
32 unsigned long __unused2;
33#else
34 unsigned long __unused1;
35 __kernel_time_t sem_otime; /* last semop time */
36 unsigned long __unused2;
37 __kernel_time_t sem_ctime; /* last change time */
38#endif
39 unsigned long sem_nsems; /* no. of semaphores in array */
40 unsigned long __unused3;
41 unsigned long __unused4;
42};
43
44#endif /* __ASM_XTENSA_SEMBUF_H */
diff --git a/arch/xtensa/include/uapi/asm/setup.h b/arch/xtensa/include/uapi/asm/setup.h
new file mode 100644
index 000000000000..9fa8ad979361
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/setup.h
@@ -0,0 +1,18 @@
1/*
2 * include/asm-xtensa/setup.h
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) 2001 - 2005 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_SETUP_H
12#define _XTENSA_SETUP_H
13
14#define COMMAND_LINE_SIZE 256
15
16extern void set_except_vector(int n, void *addr);
17
18#endif
diff --git a/arch/xtensa/include/uapi/asm/shmbuf.h b/arch/xtensa/include/uapi/asm/shmbuf.h
new file mode 100644
index 000000000000..ad4b0121782c
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/shmbuf.h
@@ -0,0 +1,71 @@
1/*
2 * include/asm-xtensa/shmbuf.h
3 *
4 * The shmid64_ds structure for Xtensa architecture.
5 * Note extra padding because this structure is passed back and forth
6 * between kernel and user space.
7 *
8 * Pad space is left for:
9 * - 64-bit time_t to solve y2038 problem
10 * - 2 miscellaneous 32-bit values
11 *
12 * This file is subject to the terms and conditions of the GNU General Public
13 * License. See the file "COPYING" in the main directory of this archive
14 * for more details.
15 *
16 * Copyright (C) 2001 - 2005 Tensilica Inc.
17 */
18
19#ifndef _XTENSA_SHMBUF_H
20#define _XTENSA_SHMBUF_H
21
22#if defined (__XTENSA_EL__)
23struct shmid64_ds {
24 struct ipc64_perm shm_perm; /* operation perms */
25 size_t shm_segsz; /* size of segment (bytes) */
26 __kernel_time_t shm_atime; /* last attach time */
27 unsigned long __unused1;
28 __kernel_time_t shm_dtime; /* last detach time */
29 unsigned long __unused2;
30 __kernel_time_t shm_ctime; /* last change time */
31 unsigned long __unused3;
32 __kernel_pid_t shm_cpid; /* pid of creator */
33 __kernel_pid_t shm_lpid; /* pid of last operator */
34 unsigned long shm_nattch; /* no. of current attaches */
35 unsigned long __unused4;
36 unsigned long __unused5;
37};
38#elif defined (__XTENSA_EB__)
39struct shmid64_ds {
40 struct ipc64_perm shm_perm; /* operation perms */
41 size_t shm_segsz; /* size of segment (bytes) */
42 __kernel_time_t shm_atime; /* last attach time */
43 unsigned long __unused1;
44 __kernel_time_t shm_dtime; /* last detach time */
45 unsigned long __unused2;
46 __kernel_time_t shm_ctime; /* last change time */
47 unsigned long __unused3;
48 __kernel_pid_t shm_cpid; /* pid of creator */
49 __kernel_pid_t shm_lpid; /* pid of last operator */
50 unsigned long shm_nattch; /* no. of current attaches */
51 unsigned long __unused4;
52 unsigned long __unused5;
53};
54#else
55# error endian order not defined
56#endif
57
58
59struct shminfo64 {
60 unsigned long shmmax;
61 unsigned long shmmin;
62 unsigned long shmmni;
63 unsigned long shmseg;
64 unsigned long shmall;
65 unsigned long __unused1;
66 unsigned long __unused2;
67 unsigned long __unused3;
68 unsigned long __unused4;
69};
70
71#endif /* _XTENSA_SHMBUF_H */
diff --git a/arch/xtensa/include/uapi/asm/sigcontext.h b/arch/xtensa/include/uapi/asm/sigcontext.h
new file mode 100644
index 000000000000..03383af8c3b7
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/sigcontext.h
@@ -0,0 +1,28 @@
1/*
2 * include/asm-xtensa/sigcontext.h
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) 2001 - 2007 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_SIGCONTEXT_H
12#define _XTENSA_SIGCONTEXT_H
13
14
15struct sigcontext {
16 unsigned long sc_pc;
17 unsigned long sc_ps;
18 unsigned long sc_lbeg;
19 unsigned long sc_lend;
20 unsigned long sc_lcount;
21 unsigned long sc_sar;
22 unsigned long sc_acclo;
23 unsigned long sc_acchi;
24 unsigned long sc_a[16];
25 void *sc_xtregs;
26};
27
28#endif /* _XTENSA_SIGCONTEXT_H */
diff --git a/arch/xtensa/include/uapi/asm/signal.h b/arch/xtensa/include/uapi/asm/signal.h
new file mode 100644
index 000000000000..b88ce96f2af9
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/signal.h
@@ -0,0 +1,148 @@
1/*
2 * include/asm-xtensa/signal.h
3 *
4 * Swiped from SH.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 *
10 * Copyright (C) 2001 - 2005 Tensilica Inc.
11 */
12
13#ifndef _UAPI_XTENSA_SIGNAL_H
14#define _UAPI_XTENSA_SIGNAL_H
15
16
17#define _NSIG 64
18#define _NSIG_BPW 32
19#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
20
21#ifndef __ASSEMBLY__
22
23#include <linux/types.h>
24
25/* Avoid too many header ordering problems. */
26struct siginfo;
27typedef unsigned long old_sigset_t; /* at least 32 bits */
28typedef struct {
29 unsigned long sig[_NSIG_WORDS];
30} sigset_t;
31
32#endif
33
34#define SIGHUP 1
35#define SIGINT 2
36#define SIGQUIT 3
37#define SIGILL 4
38#define SIGTRAP 5
39#define SIGABRT 6
40#define SIGIOT 6
41#define SIGBUS 7
42#define SIGFPE 8
43#define SIGKILL 9
44#define SIGUSR1 10
45#define SIGSEGV 11
46#define SIGUSR2 12
47#define SIGPIPE 13
48#define SIGALRM 14
49#define SIGTERM 15
50#define SIGSTKFLT 16
51#define SIGCHLD 17
52#define SIGCONT 18
53#define SIGSTOP 19
54#define SIGTSTP 20
55#define SIGTTIN 21
56#define SIGTTOU 22
57#define SIGURG 23
58#define SIGXCPU 24
59#define SIGXFSZ 25
60#define SIGVTALRM 26
61#define SIGPROF 27
62#define SIGWINCH 28
63#define SIGIO 29
64#define SIGPOLL SIGIO
65/* #define SIGLOST 29 */
66#define SIGPWR 30
67#define SIGSYS 31
68#define SIGUNUSED 31
69
70/* These should not be considered constants from userland. */
71#define SIGRTMIN 32
72#define SIGRTMAX (_NSIG-1)
73
74/*
75 * SA_FLAGS values:
76 *
77 * SA_ONSTACK indicates that a registered stack_t will be used.
78 * SA_RESTART flag to get restarting signals (which were the default long ago)
79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
80 * SA_RESETHAND clears the handler when the signal is delivered.
81 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
82 * SA_NODEFER prevents the current signal from being masked in the handler.
83 *
84 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
85 * Unix names RESETHAND and NODEFER respectively.
86 */
87#define SA_NOCLDSTOP 0x00000001
88#define SA_NOCLDWAIT 0x00000002 /* not supported yet */
89#define SA_SIGINFO 0x00000004
90#define SA_ONSTACK 0x08000000
91#define SA_RESTART 0x10000000
92#define SA_NODEFER 0x40000000
93#define SA_RESETHAND 0x80000000
94
95#define SA_NOMASK SA_NODEFER
96#define SA_ONESHOT SA_RESETHAND
97
98#define SA_RESTORER 0x04000000
99
100/*
101 * sigaltstack controls
102 */
103#define SS_ONSTACK 1
104#define SS_DISABLE 2
105
106#define MINSIGSTKSZ 2048
107#define SIGSTKSZ 8192
108
109#ifndef __ASSEMBLY__
110
111#define SIG_BLOCK 0 /* for blocking signals */
112#define SIG_UNBLOCK 1 /* for unblocking signals */
113#define SIG_SETMASK 2 /* for setting the signal mask */
114
115/* Type of a signal handler. */
116typedef void (*__sighandler_t)(int);
117
118#define SIG_DFL ((__sighandler_t)0) /* default signal handling */
119#define SIG_IGN ((__sighandler_t)1) /* ignore signal */
120#define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
121
122#ifndef __KERNEL__
123
124/* Here we must cater to libcs that poke about in kernel headers. */
125
126struct sigaction {
127 union {
128 __sighandler_t _sa_handler;
129 void (*_sa_sigaction)(int, struct siginfo *, void *);
130 } _u;
131 sigset_t sa_mask;
132 unsigned long sa_flags;
133 void (*sa_restorer)(void);
134};
135
136#define sa_handler _u._sa_handler
137#define sa_sigaction _u._sa_sigaction
138
139#endif /* __KERNEL__ */
140
141typedef struct sigaltstack {
142 void *ss_sp;
143 int ss_flags;
144 size_t ss_size;
145} stack_t;
146
147#endif /* __ASSEMBLY__ */
148#endif /* _UAPI_XTENSA_SIGNAL_H */
diff --git a/arch/xtensa/include/uapi/asm/socket.h b/arch/xtensa/include/uapi/asm/socket.h
new file mode 100644
index 000000000000..38079be1cf1e
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/socket.h
@@ -0,0 +1,84 @@
1/*
2 * include/asm-xtensa/socket.h
3 *
4 * Copied from i386.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11#ifndef _XTENSA_SOCKET_H
12#define _XTENSA_SOCKET_H
13
14#include <asm/sockios.h>
15
16/* For setsockoptions(2) */
17#define SOL_SOCKET 1
18
19#define SO_DEBUG 1
20#define SO_REUSEADDR 2
21#define SO_TYPE 3
22#define SO_ERROR 4
23#define SO_DONTROUTE 5
24#define SO_BROADCAST 6
25#define SO_SNDBUF 7
26#define SO_RCVBUF 8
27#define SO_SNDBUFFORCE 32
28#define SO_RCVBUFFORCE 33
29#define SO_KEEPALIVE 9
30#define SO_OOBINLINE 10
31#define SO_NO_CHECK 11
32#define SO_PRIORITY 12
33#define SO_LINGER 13
34#define SO_BSDCOMPAT 14
35/* To add :#define SO_REUSEPORT 15 */
36#define SO_PASSCRED 16
37#define SO_PEERCRED 17
38#define SO_RCVLOWAT 18
39#define SO_SNDLOWAT 19
40#define SO_RCVTIMEO 20
41#define SO_SNDTIMEO 21
42
43/* Security levels - as per NRL IPv6 - don't actually do anything */
44
45#define SO_SECURITY_AUTHENTICATION 22
46#define SO_SECURITY_ENCRYPTION_TRANSPORT 23
47#define SO_SECURITY_ENCRYPTION_NETWORK 24
48
49#define SO_BINDTODEVICE 25
50
51/* Socket filtering */
52
53#define SO_ATTACH_FILTER 26
54#define SO_DETACH_FILTER 27
55#define SO_GET_FILTER SO_ATTACH_FILTER
56
57#define SO_PEERNAME 28
58#define SO_TIMESTAMP 29
59#define SCM_TIMESTAMP SO_TIMESTAMP
60
61#define SO_ACCEPTCONN 30
62#define SO_PEERSEC 31
63#define SO_PASSSEC 34
64#define SO_TIMESTAMPNS 35
65#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
66
67#define SO_MARK 36
68
69#define SO_TIMESTAMPING 37
70#define SCM_TIMESTAMPING SO_TIMESTAMPING
71
72#define SO_PROTOCOL 38
73#define SO_DOMAIN 39
74
75#define SO_RXQ_OVFL 40
76
77#define SO_WIFI_STATUS 41
78#define SCM_WIFI_STATUS SO_WIFI_STATUS
79#define SO_PEEK_OFF 42
80
81/* Instruct lower device to use last 4-bytes of skb data as FCS */
82#define SO_NOFCS 43
83
84#endif /* _XTENSA_SOCKET_H */
diff --git a/arch/xtensa/include/uapi/asm/sockios.h b/arch/xtensa/include/uapi/asm/sockios.h
new file mode 100644
index 000000000000..efe0af379f01
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/sockios.h
@@ -0,0 +1,31 @@
1/*
2 * include/asm-xtensa/sockios.h
3 *
4 * Socket-level I/O control calls. Copied from MIPS.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 *
10 * Copyright (C) 1995 by Ralf Baechle
11 * Copyright (C) 2001 Tensilica Inc.
12 */
13
14#ifndef _XTENSA_SOCKIOS_H
15#define _XTENSA_SOCKIOS_H
16
17#include <asm/ioctl.h>
18
19/* Socket-level I/O control calls. */
20
21#define FIOGETOWN _IOR('f', 123, int)
22#define FIOSETOWN _IOW('f', 124, int)
23
24#define SIOCATMARK _IOR('s', 7, int)
25#define SIOCSPGRP _IOW('s', 8, pid_t)
26#define SIOCGPGRP _IOR('s', 9, pid_t)
27
28#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
29#define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */
30
31#endif /* _XTENSA_SOCKIOS_H */
diff --git a/arch/xtensa/include/uapi/asm/stat.h b/arch/xtensa/include/uapi/asm/stat.h
new file mode 100644
index 000000000000..c4992038cee0
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/stat.h
@@ -0,0 +1,59 @@
1/*
2 * include/asm-xtensa/stat.h
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) 2001 - 2007 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_STAT_H
12#define _XTENSA_STAT_H
13
14#define STAT_HAVE_NSEC 1
15
16struct stat {
17 unsigned long st_dev;
18 unsigned long st_ino;
19 unsigned int st_mode;
20 unsigned int st_nlink;
21 unsigned int st_uid;
22 unsigned int st_gid;
23 unsigned long st_rdev;
24 long st_size;
25 unsigned long st_blksize;
26 unsigned long st_blocks;
27 unsigned long st_atime;
28 unsigned long st_atime_nsec;
29 unsigned long st_mtime;
30 unsigned long st_mtime_nsec;
31 unsigned long st_ctime;
32 unsigned long st_ctime_nsec;
33 unsigned long __unused4;
34 unsigned long __unused5;
35};
36
37struct stat64 {
38 unsigned long long st_dev; /* Device */
39 unsigned long long st_ino; /* File serial number */
40 unsigned int st_mode; /* File mode. */
41 unsigned int st_nlink; /* Link count. */
42 unsigned int st_uid; /* User ID of the file's owner. */
43 unsigned int st_gid; /* Group ID of the file's group. */
44 unsigned long long st_rdev; /* Device number, if device. */
45 long long st_size; /* Size of file, in bytes. */
46 unsigned long st_blksize; /* Optimal block size for I/O. */
47 unsigned long __unused2;
48 unsigned long long st_blocks; /* Number 512-byte blocks allocated. */
49 unsigned long st_atime; /* Time of last access. */
50 unsigned long st_atime_nsec;
51 unsigned long st_mtime; /* Time of last modification. */
52 unsigned long st_mtime_nsec;
53 unsigned long st_ctime; /* Time of last status change. */
54 unsigned long st_ctime_nsec;
55 unsigned long __unused4;
56 unsigned long __unused5;
57};
58
59#endif /* _XTENSA_STAT_H */
diff --git a/arch/xtensa/include/uapi/asm/swab.h b/arch/xtensa/include/uapi/asm/swab.h
new file mode 100644
index 000000000000..226a39162310
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/swab.h
@@ -0,0 +1,70 @@
1/*
2 * include/asm-xtensa/swab.h
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) 2001 - 2005 Tensilica Inc.
9 */
10
11#ifndef _XTENSA_SWAB_H
12#define _XTENSA_SWAB_H
13
14#include <linux/types.h>
15#include <linux/compiler.h>
16
17#define __SWAB_64_THRU_32__
18
19static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
20{
21 __u32 res;
22 /* instruction sequence from Xtensa ISA release 2/2000 */
23 __asm__("ssai 8 \n\t"
24 "srli %0, %1, 16 \n\t"
25 "src %0, %0, %1 \n\t"
26 "src %0, %0, %0 \n\t"
27 "src %0, %1, %0 \n"
28 : "=&a" (res)
29 : "a" (x)
30 );
31 return res;
32}
33#define __arch_swab32 __arch_swab32
34
35static inline __attribute_const__ __u16 __arch_swab16(__u16 x)
36{
37 /* Given that 'short' values are signed (i.e., can be negative),
38 * we cannot assume that the upper 16-bits of the register are
39 * zero. We are careful to mask values after shifting.
40 */
41
42 /* There exists an anomaly between xt-gcc and xt-xcc. xt-gcc
43 * inserts an extui instruction after putting this function inline
44 * to ensure that it uses only the least-significant 16 bits of
45 * the result. xt-xcc doesn't use an extui, but assumes the
46 * __asm__ macro follows convention that the upper 16 bits of an
47 * 'unsigned short' result are still zero. This macro doesn't
48 * follow convention; indeed, it leaves garbage in the upport 16
49 * bits of the register.
50
51 * Declaring the temporary variables 'res' and 'tmp' to be 32-bit
52 * types while the return type of the function is a 16-bit type
53 * forces both compilers to insert exactly one extui instruction
54 * (or equivalent) to mask off the upper 16 bits. */
55
56 __u32 res;
57 __u32 tmp;
58
59 __asm__("extui %1, %2, 8, 8\n\t"
60 "slli %0, %2, 8 \n\t"
61 "or %0, %0, %1 \n"
62 : "=&a" (res), "=&a" (tmp)
63 : "a" (x)
64 );
65
66 return res;
67}
68#define __arch_swab16 __arch_swab16
69
70#endif /* _XTENSA_SWAB_H */
diff --git a/arch/xtensa/include/uapi/asm/termbits.h b/arch/xtensa/include/uapi/asm/termbits.h
new file mode 100644
index 000000000000..0d6c8715b24f
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/termbits.h
@@ -0,0 +1,220 @@
1/*
2 * include/asm-xtensa/termbits.h
3 *
4 * Copied from SH.
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 *
10 * Copyright (C) 2001 - 2005 Tensilica Inc.
11 */
12
13#ifndef _XTENSA_TERMBITS_H
14#define _XTENSA_TERMBITS_H
15
16
17#include <linux/posix_types.h>
18
19typedef unsigned char cc_t;
20typedef unsigned int speed_t;
21typedef unsigned int tcflag_t;
22
23#define NCCS 19
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
57#define VINTR 0
58#define VQUIT 1
59#define VERASE 2
60#define VKILL 3
61#define VEOF 4
62#define VTIME 5
63#define VMIN 6
64#define VSWTC 7
65#define VSTART 8
66#define VSTOP 9
67#define VSUSP 10
68#define VEOL 11
69#define VREPRINT 12
70#define VDISCARD 13
71#define VWERASE 14
72#define VLNEXT 15
73#define VEOL2 16
74
75/* c_iflag bits */
76
77#define IGNBRK 0000001
78#define BRKINT 0000002
79#define IGNPAR 0000004
80#define PARMRK 0000010
81#define INPCK 0000020
82#define ISTRIP 0000040
83#define INLCR 0000100
84#define IGNCR 0000200
85#define ICRNL 0000400
86#define IUCLC 0001000
87#define IXON 0002000
88#define IXANY 0004000
89#define IXOFF 0010000
90#define IMAXBEL 0020000
91#define IUTF8 0040000
92
93/* c_oflag bits */
94
95#define OPOST 0000001
96#define OLCUC 0000002
97#define ONLCR 0000004
98#define OCRNL 0000010
99#define ONOCR 0000020
100#define ONLRET 0000040
101#define OFILL 0000100
102#define OFDEL 0000200
103#define NLDLY 0000400
104#define NL0 0000000
105#define NL1 0000400
106#define CRDLY 0003000
107#define CR0 0000000
108#define CR1 0001000
109#define CR2 0002000
110#define CR3 0003000
111#define TABDLY 0014000
112#define TAB0 0000000
113#define TAB1 0004000
114#define TAB2 0010000
115#define TAB3 0014000
116#define XTABS 0014000
117#define BSDLY 0020000
118#define BS0 0000000
119#define BS1 0020000
120#define VTDLY 0040000
121#define VT0 0000000
122#define VT1 0040000
123#define FFDLY 0100000
124#define FF0 0000000
125#define FF1 0100000
126
127/* c_cflag bit meaning */
128
129#define CBAUD 0010017
130#define B0 0000000 /* hang up */
131#define B50 0000001
132#define B75 0000002
133#define B110 0000003
134#define B134 0000004
135#define B150 0000005
136#define B200 0000006
137#define B300 0000007
138#define B600 0000010
139#define B1200 0000011
140#define B1800 0000012
141#define B2400 0000013
142#define B4800 0000014
143#define B9600 0000015
144#define B19200 0000016
145#define B38400 0000017
146#define EXTA B19200
147#define EXTB B38400
148#define CSIZE 0000060
149#define CS5 0000000
150#define CS6 0000020
151#define CS7 0000040
152#define CS8 0000060
153#define CSTOPB 0000100
154#define CREAD 0000200
155#define PARENB 0000400
156#define PARODD 0001000
157#define HUPCL 0002000
158#define CLOCAL 0004000
159#define CBAUDEX 0010000
160#define BOTHER 0010000
161#define B57600 0010001
162#define B115200 0010002
163#define B230400 0010003
164#define B460800 0010004
165#define B500000 0010005
166#define B576000 0010006
167#define B921600 0010007
168#define B1000000 0010010
169#define B1152000 0010011
170#define B1500000 0010012
171#define B2000000 0010013
172#define B2500000 0010014
173#define B3000000 0010015
174#define B3500000 0010016
175#define B4000000 0010017
176#define CIBAUD 002003600000 /* input baud rate */
177#define CMSPAR 010000000000 /* mark or space (stick) parity */
178#define CRTSCTS 020000000000 /* flow control */
179
180#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
181
182/* c_lflag bits */
183
184#define ISIG 0000001
185#define ICANON 0000002
186#define XCASE 0000004
187#define ECHO 0000010
188#define ECHOE 0000020
189#define ECHOK 0000040
190#define ECHONL 0000100
191#define NOFLSH 0000200
192#define TOSTOP 0000400
193#define ECHOCTL 0001000
194#define ECHOPRT 0002000
195#define ECHOKE 0004000
196#define FLUSHO 0010000
197#define PENDIN 0040000
198#define IEXTEN 0100000
199#define EXTPROC 0200000
200
201/* tcflow() and TCXONC use these */
202
203#define TCOOFF 0
204#define TCOON 1
205#define TCIOFF 2
206#define TCION 3
207
208/* tcflush() and TCFLSH use these */
209
210#define TCIFLUSH 0
211#define TCOFLUSH 1
212#define TCIOFLUSH 2
213
214/* tcsetattr uses these */
215
216#define TCSANOW 0
217#define TCSADRAIN 1
218#define TCSAFLUSH 2
219
220#endif /* _XTENSA_TERMBITS_H */
diff --git a/arch/xtensa/include/uapi/asm/types.h b/arch/xtensa/include/uapi/asm/types.h
new file mode 100644
index 000000000000..87ec7ae73cb1
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/types.h
@@ -0,0 +1,28 @@
1/*
2 * include/asm-xtensa/types.h
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) 2001 - 2005 Tensilica Inc.
9 */
10
11#ifndef _UAPI_XTENSA_TYPES_H
12#define _UAPI_XTENSA_TYPES_H
13
14#include <asm-generic/int-ll64.h>
15
16#ifdef __ASSEMBLY__
17# define __XTENSA_UL(x) (x)
18# define __XTENSA_UL_CONST(x) x
19#else
20# define __XTENSA_UL(x) ((unsigned long)(x))
21# define __XTENSA_UL_CONST(x) x##UL
22#endif
23
24#ifndef __ASSEMBLY__
25
26#endif
27
28#endif /* _UAPI_XTENSA_TYPES_H */
diff --git a/arch/xtensa/include/uapi/asm/unistd.h b/arch/xtensa/include/uapi/asm/unistd.h
new file mode 100644
index 000000000000..9f36d0e3e0ac
--- /dev/null
+++ b/arch/xtensa/include/uapi/asm/unistd.h
@@ -0,0 +1,754 @@
1#if !defined(_UAPI_XTENSA_UNISTD_H) || defined(__SYSCALL)
2#define _UAPI_XTENSA_UNISTD_H
3
4#ifndef __SYSCALL
5# define __SYSCALL(nr,func,nargs)
6#endif
7
8#define __NR_spill 0
9__SYSCALL( 0, sys_ni_syscall, 0)
10#define __NR_xtensa 1
11__SYSCALL( 1, sys_ni_syscall, 0)
12#define __NR_available4 2
13__SYSCALL( 2, sys_ni_syscall, 0)
14#define __NR_available5 3
15__SYSCALL( 3, sys_ni_syscall, 0)
16#define __NR_available6 4
17__SYSCALL( 4, sys_ni_syscall, 0)
18#define __NR_available7 5
19__SYSCALL( 5, sys_ni_syscall, 0)
20#define __NR_available8 6
21__SYSCALL( 6, sys_ni_syscall, 0)
22#define __NR_available9 7
23__SYSCALL( 7, sys_ni_syscall, 0)
24
25/* File Operations */
26
27#define __NR_open 8
28__SYSCALL( 8, sys_open, 3)
29#define __NR_close 9
30__SYSCALL( 9, sys_close, 1)
31#define __NR_dup 10
32__SYSCALL( 10, sys_dup, 1)
33#define __NR_dup2 11
34__SYSCALL( 11, sys_dup2, 2)
35#define __NR_read 12
36__SYSCALL( 12, sys_read, 3)
37#define __NR_write 13
38__SYSCALL( 13, sys_write, 3)
39#define __NR_select 14
40__SYSCALL( 14, sys_select, 5)
41#define __NR_lseek 15
42__SYSCALL( 15, sys_lseek, 3)
43#define __NR_poll 16
44__SYSCALL( 16, sys_poll, 3)
45#define __NR__llseek 17
46__SYSCALL( 17, sys_llseek, 5)
47#define __NR_epoll_wait 18
48__SYSCALL( 18, sys_epoll_wait, 4)
49#define __NR_epoll_ctl 19
50__SYSCALL( 19, sys_epoll_ctl, 4)
51#define __NR_epoll_create 20
52__SYSCALL( 20, sys_epoll_create, 1)
53#define __NR_creat 21
54__SYSCALL( 21, sys_creat, 2)
55#define __NR_truncate 22
56__SYSCALL( 22, sys_truncate, 2)
57#define __NR_ftruncate 23
58__SYSCALL( 23, sys_ftruncate, 2)
59#define __NR_readv 24
60__SYSCALL( 24, sys_readv, 3)
61#define __NR_writev 25
62__SYSCALL( 25, sys_writev, 3)
63#define __NR_fsync 26
64__SYSCALL( 26, sys_fsync, 1)
65#define __NR_fdatasync 27
66__SYSCALL( 27, sys_fdatasync, 1)
67#define __NR_truncate64 28
68__SYSCALL( 28, sys_truncate64, 2)
69#define __NR_ftruncate64 29
70__SYSCALL( 29, sys_ftruncate64, 2)
71#define __NR_pread64 30
72__SYSCALL( 30, sys_pread64, 6)
73#define __NR_pwrite64 31
74__SYSCALL( 31, sys_pwrite64, 6)
75
76#define __NR_link 32
77__SYSCALL( 32, sys_link, 2)
78#define __NR_rename 33
79__SYSCALL( 33, sys_rename, 2)
80#define __NR_symlink 34
81__SYSCALL( 34, sys_symlink, 2)
82#define __NR_readlink 35
83__SYSCALL( 35, sys_readlink, 3)
84#define __NR_mknod 36
85__SYSCALL( 36, sys_mknod, 3)
86#define __NR_pipe 37
87__SYSCALL( 37, sys_pipe, 1)
88#define __NR_unlink 38
89__SYSCALL( 38, sys_unlink, 1)
90#define __NR_rmdir 39
91__SYSCALL( 39, sys_rmdir, 1)
92
93#define __NR_mkdir 40
94__SYSCALL( 40, sys_mkdir, 2)
95#define __NR_chdir 41
96__SYSCALL( 41, sys_chdir, 1)
97#define __NR_fchdir 42
98__SYSCALL( 42, sys_fchdir, 1)
99#define __NR_getcwd 43
100__SYSCALL( 43, sys_getcwd, 2)
101
102#define __NR_chmod 44
103__SYSCALL( 44, sys_chmod, 2)
104#define __NR_chown 45
105__SYSCALL( 45, sys_chown, 3)
106#define __NR_stat 46
107__SYSCALL( 46, sys_newstat, 2)
108#define __NR_stat64 47
109__SYSCALL( 47, sys_stat64, 2)
110
111#define __NR_lchown 48
112__SYSCALL( 48, sys_lchown, 3)
113#define __NR_lstat 49
114__SYSCALL( 49, sys_newlstat, 2)
115#define __NR_lstat64 50
116__SYSCALL( 50, sys_lstat64, 2)
117#define __NR_available51 51
118__SYSCALL( 51, sys_ni_syscall, 0)
119
120#define __NR_fchmod 52
121__SYSCALL( 52, sys_fchmod, 2)
122#define __NR_fchown 53
123__SYSCALL( 53, sys_fchown, 3)
124#define __NR_fstat 54
125__SYSCALL( 54, sys_newfstat, 2)
126#define __NR_fstat64 55
127__SYSCALL( 55, sys_fstat64, 2)
128
129#define __NR_flock 56
130__SYSCALL( 56, sys_flock, 2)
131#define __NR_access 57
132__SYSCALL( 57, sys_access, 2)
133#define __NR_umask 58
134__SYSCALL( 58, sys_umask, 1)
135#define __NR_getdents 59
136__SYSCALL( 59, sys_getdents, 3)
137#define __NR_getdents64 60
138__SYSCALL( 60, sys_getdents64, 3)
139#define __NR_fcntl64 61
140__SYSCALL( 61, sys_fcntl64, 3)
141#define __NR_fallocate 62
142__SYSCALL( 62, sys_fallocate, 6)
143#define __NR_fadvise64_64 63
144__SYSCALL( 63, xtensa_fadvise64_64, 6)
145#define __NR_utime 64 /* glibc 2.3.3 ?? */
146__SYSCALL( 64, sys_utime, 2)
147#define __NR_utimes 65
148__SYSCALL( 65, sys_utimes, 2)
149#define __NR_ioctl 66
150__SYSCALL( 66, sys_ioctl, 3)
151#define __NR_fcntl 67
152__SYSCALL( 67, sys_fcntl, 3)
153
154#define __NR_setxattr 68
155__SYSCALL( 68, sys_setxattr, 5)
156#define __NR_getxattr 69
157__SYSCALL( 69, sys_getxattr, 4)
158#define __NR_listxattr 70
159__SYSCALL( 70, sys_listxattr, 3)
160#define __NR_removexattr 71
161__SYSCALL( 71, sys_removexattr, 2)
162#define __NR_lsetxattr 72
163__SYSCALL( 72, sys_lsetxattr, 5)
164#define __NR_lgetxattr 73
165__SYSCALL( 73, sys_lgetxattr, 4)
166#define __NR_llistxattr 74
167__SYSCALL( 74, sys_llistxattr, 3)
168#define __NR_lremovexattr 75
169__SYSCALL( 75, sys_lremovexattr, 2)
170#define __NR_fsetxattr 76
171__SYSCALL( 76, sys_fsetxattr, 5)
172#define __NR_fgetxattr 77
173__SYSCALL( 77, sys_fgetxattr, 4)
174#define __NR_flistxattr 78
175__SYSCALL( 78, sys_flistxattr, 3)
176#define __NR_fremovexattr 79
177__SYSCALL( 79, sys_fremovexattr, 2)
178
179/* File Map / Shared Memory Operations */
180
181#define __NR_mmap2 80
182__SYSCALL( 80, sys_mmap_pgoff, 6)
183#define __NR_munmap 81
184__SYSCALL( 81, sys_munmap, 2)
185#define __NR_mprotect 82
186__SYSCALL( 82, sys_mprotect, 3)
187#define __NR_brk 83
188__SYSCALL( 83, sys_brk, 1)
189#define __NR_mlock 84
190__SYSCALL( 84, sys_mlock, 2)
191#define __NR_munlock 85
192__SYSCALL( 85, sys_munlock, 2)
193#define __NR_mlockall 86
194__SYSCALL( 86, sys_mlockall, 1)
195#define __NR_munlockall 87
196__SYSCALL( 87, sys_munlockall, 0)
197#define __NR_mremap 88
198__SYSCALL( 88, sys_mremap, 4)
199#define __NR_msync 89
200__SYSCALL( 89, sys_msync, 3)
201#define __NR_mincore 90
202__SYSCALL( 90, sys_mincore, 3)
203#define __NR_madvise 91
204__SYSCALL( 91, sys_madvise, 3)
205#define __NR_shmget 92
206__SYSCALL( 92, sys_shmget, 4)
207#define __NR_shmat 93
208__SYSCALL( 93, xtensa_shmat, 4)
209#define __NR_shmctl 94
210__SYSCALL( 94, sys_shmctl, 4)
211#define __NR_shmdt 95
212__SYSCALL( 95, sys_shmdt, 4)
213
214/* Socket Operations */
215
216#define __NR_socket 96
217__SYSCALL( 96, sys_socket, 3)
218#define __NR_setsockopt 97
219__SYSCALL( 97, sys_setsockopt, 5)
220#define __NR_getsockopt 98
221__SYSCALL( 98, sys_getsockopt, 5)
222#define __NR_shutdown 99
223__SYSCALL( 99, sys_shutdown, 2)
224
225#define __NR_bind 100
226__SYSCALL(100, sys_bind, 3)
227#define __NR_connect 101
228__SYSCALL(101, sys_connect, 3)
229#define __NR_listen 102
230__SYSCALL(102, sys_listen, 2)
231#define __NR_accept 103
232__SYSCALL(103, sys_accept, 3)
233
234#define __NR_getsockname 104
235__SYSCALL(104, sys_getsockname, 3)
236#define __NR_getpeername 105
237__SYSCALL(105, sys_getpeername, 3)
238#define __NR_sendmsg 106
239__SYSCALL(106, sys_sendmsg, 3)
240#define __NR_recvmsg 107
241__SYSCALL(107, sys_recvmsg, 3)
242#define __NR_send 108
243__SYSCALL(108, sys_send, 4)
244#define __NR_recv 109
245__SYSCALL(109, sys_recv, 4)
246#define __NR_sendto 110
247__SYSCALL(110, sys_sendto, 6)
248#define __NR_recvfrom 111
249__SYSCALL(111, sys_recvfrom, 6)
250
251#define __NR_socketpair 112
252__SYSCALL(112, sys_socketpair, 4)
253#define __NR_sendfile 113
254__SYSCALL(113, sys_sendfile, 4)
255#define __NR_sendfile64 114
256__SYSCALL(114, sys_sendfile64, 4)
257#define __NR_sendmmsg 115
258__SYSCALL(115, sys_sendmmsg, 4)
259
260/* Process Operations */
261
262#define __NR_clone 116
263__SYSCALL(116, xtensa_clone, 5)
264#define __NR_execve 117
265__SYSCALL(117, sys_execve, 3)
266#define __NR_exit 118
267__SYSCALL(118, sys_exit, 1)
268#define __NR_exit_group 119
269__SYSCALL(119, sys_exit_group, 1)
270#define __NR_getpid 120
271__SYSCALL(120, sys_getpid, 0)
272#define __NR_wait4 121
273__SYSCALL(121, sys_wait4, 4)
274#define __NR_waitid 122
275__SYSCALL(122, sys_waitid, 5)
276#define __NR_kill 123
277__SYSCALL(123, sys_kill, 2)
278#define __NR_tkill 124
279__SYSCALL(124, sys_tkill, 2)
280#define __NR_tgkill 125
281__SYSCALL(125, sys_tgkill, 3)
282#define __NR_set_tid_address 126
283__SYSCALL(126, sys_set_tid_address, 1)
284#define __NR_gettid 127
285__SYSCALL(127, sys_gettid, 0)
286#define __NR_setsid 128
287__SYSCALL(128, sys_setsid, 0)
288#define __NR_getsid 129
289__SYSCALL(129, sys_getsid, 1)
290#define __NR_prctl 130
291__SYSCALL(130, sys_prctl, 5)
292#define __NR_personality 131
293__SYSCALL(131, sys_personality, 1)
294#define __NR_getpriority 132
295__SYSCALL(132, sys_getpriority, 2)
296#define __NR_setpriority 133
297__SYSCALL(133, sys_setpriority, 3)
298#define __NR_setitimer 134
299__SYSCALL(134, sys_setitimer, 3)
300#define __NR_getitimer 135
301__SYSCALL(135, sys_getitimer, 2)
302#define __NR_setuid 136
303__SYSCALL(136, sys_setuid, 1)
304#define __NR_getuid 137
305__SYSCALL(137, sys_getuid, 0)
306#define __NR_setgid 138
307__SYSCALL(138, sys_setgid, 1)
308#define __NR_getgid 139
309__SYSCALL(139, sys_getgid, 0)
310#define __NR_geteuid 140
311__SYSCALL(140, sys_geteuid, 0)
312#define __NR_getegid 141
313__SYSCALL(141, sys_getegid, 0)
314#define __NR_setreuid 142
315__SYSCALL(142, sys_setreuid, 2)
316#define __NR_setregid 143
317__SYSCALL(143, sys_setregid, 2)
318#define __NR_setresuid 144
319__SYSCALL(144, sys_setresuid, 3)
320#define __NR_getresuid 145
321__SYSCALL(145, sys_getresuid, 3)
322#define __NR_setresgid 146
323__SYSCALL(146, sys_setresgid, 3)
324#define __NR_getresgid 147
325__SYSCALL(147, sys_getresgid, 3)
326#define __NR_setpgid 148
327__SYSCALL(148, sys_setpgid, 2)
328#define __NR_getpgid 149
329__SYSCALL(149, sys_getpgid, 1)
330#define __NR_getppid 150
331__SYSCALL(150, sys_getppid, 0)
332#define __NR_getpgrp 151
333__SYSCALL(151, sys_getpgrp, 0)
334
335#define __NR_reserved152 152 /* set_thread_area */
336__SYSCALL(152, sys_ni_syscall, 0)
337#define __NR_reserved153 153 /* get_thread_area */
338__SYSCALL(153, sys_ni_syscall, 0)
339#define __NR_times 154
340__SYSCALL(154, sys_times, 1)
341#define __NR_acct 155
342__SYSCALL(155, sys_acct, 1)
343#define __NR_sched_setaffinity 156
344__SYSCALL(156, sys_sched_setaffinity, 3)
345#define __NR_sched_getaffinity 157
346__SYSCALL(157, sys_sched_getaffinity, 3)
347#define __NR_capget 158
348__SYSCALL(158, sys_capget, 2)
349#define __NR_capset 159
350__SYSCALL(159, sys_capset, 2)
351#define __NR_ptrace 160
352__SYSCALL(160, sys_ptrace, 4)
353#define __NR_semtimedop 161
354__SYSCALL(161, sys_semtimedop, 5)
355#define __NR_semget 162
356__SYSCALL(162, sys_semget, 4)
357#define __NR_semop 163
358__SYSCALL(163, sys_semop, 4)
359#define __NR_semctl 164
360__SYSCALL(164, sys_semctl, 4)
361#define __NR_available165 165
362__SYSCALL(165, sys_ni_syscall, 0)
363#define __NR_msgget 166
364__SYSCALL(166, sys_msgget, 4)
365#define __NR_msgsnd 167
366__SYSCALL(167, sys_msgsnd, 4)
367#define __NR_msgrcv 168
368__SYSCALL(168, sys_msgrcv, 4)
369#define __NR_msgctl 169
370__SYSCALL(169, sys_msgctl, 4)
371#define __NR_available170 170
372__SYSCALL(170, sys_ni_syscall, 0)
373
374/* File System */
375
376#define __NR_umount2 171
377__SYSCALL(171, sys_umount, 2)
378#define __NR_mount 172
379__SYSCALL(172, sys_mount, 5)
380#define __NR_swapon 173
381__SYSCALL(173, sys_swapon, 2)
382#define __NR_chroot 174
383__SYSCALL(174, sys_chroot, 1)
384#define __NR_pivot_root 175
385__SYSCALL(175, sys_pivot_root, 2)
386#define __NR_umount 176
387__SYSCALL(176, sys_umount, 2)
388#define __NR_swapoff 177
389__SYSCALL(177, sys_swapoff, 1)
390#define __NR_sync 178
391__SYSCALL(178, sys_sync, 0)
392#define __NR_syncfs 179
393__SYSCALL(179, sys_syncfs, 1)
394#define __NR_setfsuid 180
395__SYSCALL(180, sys_setfsuid, 1)
396#define __NR_setfsgid 181
397__SYSCALL(181, sys_setfsgid, 1)
398#define __NR_sysfs 182
399__SYSCALL(182, sys_sysfs, 3)
400#define __NR_ustat 183
401__SYSCALL(183, sys_ustat, 2)
402#define __NR_statfs 184
403__SYSCALL(184, sys_statfs, 2)
404#define __NR_fstatfs 185
405__SYSCALL(185, sys_fstatfs, 2)
406#define __NR_statfs64 186
407__SYSCALL(186, sys_statfs64, 3)
408#define __NR_fstatfs64 187
409__SYSCALL(187, sys_fstatfs64, 3)
410
411/* System */
412
413#define __NR_setrlimit 188
414__SYSCALL(188, sys_setrlimit, 2)
415#define __NR_getrlimit 189
416__SYSCALL(189, sys_getrlimit, 2)
417#define __NR_getrusage 190
418__SYSCALL(190, sys_getrusage, 2)
419#define __NR_futex 191
420__SYSCALL(191, sys_futex, 5)
421#define __NR_gettimeofday 192
422__SYSCALL(192, sys_gettimeofday, 2)
423#define __NR_settimeofday 193
424__SYSCALL(193, sys_settimeofday, 2)
425#define __NR_adjtimex 194
426__SYSCALL(194, sys_adjtimex, 1)
427#define __NR_nanosleep 195
428__SYSCALL(195, sys_nanosleep, 2)
429#define __NR_getgroups 196
430__SYSCALL(196, sys_getgroups, 2)
431#define __NR_setgroups 197
432__SYSCALL(197, sys_setgroups, 2)
433#define __NR_sethostname 198
434__SYSCALL(198, sys_sethostname, 2)
435#define __NR_setdomainname 199
436__SYSCALL(199, sys_setdomainname, 2)
437#define __NR_syslog 200
438__SYSCALL(200, sys_syslog, 3)
439#define __NR_vhangup 201
440__SYSCALL(201, sys_vhangup, 0)
441#define __NR_uselib 202
442__SYSCALL(202, sys_uselib, 1)
443#define __NR_reboot 203
444__SYSCALL(203, sys_reboot, 3)
445#define __NR_quotactl 204
446__SYSCALL(204, sys_quotactl, 4)
447#define __NR_nfsservctl 205
448__SYSCALL(205, sys_ni_syscall, 0) /* old nfsservctl */
449#define __NR__sysctl 206
450__SYSCALL(206, sys_sysctl, 1)
451#define __NR_bdflush 207
452__SYSCALL(207, sys_bdflush, 2)
453#define __NR_uname 208
454__SYSCALL(208, sys_newuname, 1)
455#define __NR_sysinfo 209
456__SYSCALL(209, sys_sysinfo, 1)
457#define __NR_init_module 210
458__SYSCALL(210, sys_init_module, 2)
459#define __NR_delete_module 211
460__SYSCALL(211, sys_delete_module, 1)
461
462#define __NR_sched_setparam 212
463__SYSCALL(212, sys_sched_setparam, 2)
464#define __NR_sched_getparam 213
465__SYSCALL(213, sys_sched_getparam, 2)
466#define __NR_sched_setscheduler 214
467__SYSCALL(214, sys_sched_setscheduler, 3)
468#define __NR_sched_getscheduler 215
469__SYSCALL(215, sys_sched_getscheduler, 1)
470#define __NR_sched_get_priority_max 216
471__SYSCALL(216, sys_sched_get_priority_max, 1)
472#define __NR_sched_get_priority_min 217
473__SYSCALL(217, sys_sched_get_priority_min, 1)
474#define __NR_sched_rr_get_interval 218
475__SYSCALL(218, sys_sched_rr_get_interval, 2)
476#define __NR_sched_yield 219
477__SYSCALL(219, sys_sched_yield, 0)
478#define __NR_available222 222
479__SYSCALL(222, sys_ni_syscall, 0)
480
481/* Signal Handling */
482
483#define __NR_restart_syscall 223
484__SYSCALL(223, sys_restart_syscall, 0)
485#define __NR_sigaltstack 224
486__SYSCALL(224, xtensa_sigaltstack, 2)
487#define __NR_rt_sigreturn 225
488__SYSCALL(225, xtensa_rt_sigreturn, 1)
489#define __NR_rt_sigaction 226
490__SYSCALL(226, sys_rt_sigaction, 4)
491#define __NR_rt_sigprocmask 227
492__SYSCALL(227, sys_rt_sigprocmask, 4)
493#define __NR_rt_sigpending 228
494__SYSCALL(228, sys_rt_sigpending, 2)
495#define __NR_rt_sigtimedwait 229
496__SYSCALL(229, sys_rt_sigtimedwait, 4)
497#define __NR_rt_sigqueueinfo 230
498__SYSCALL(230, sys_rt_sigqueueinfo, 3)
499#define __NR_rt_sigsuspend 231
500__SYSCALL(231, sys_rt_sigsuspend, 2)
501
502/* Message */
503
504#define __NR_mq_open 232
505__SYSCALL(232, sys_mq_open, 4)
506#define __NR_mq_unlink 233
507__SYSCALL(233, sys_mq_unlink, 1)
508#define __NR_mq_timedsend 234
509__SYSCALL(234, sys_mq_timedsend, 5)
510#define __NR_mq_timedreceive 235
511__SYSCALL(235, sys_mq_timedreceive, 5)
512#define __NR_mq_notify 236
513__SYSCALL(236, sys_mq_notify, 2)
514#define __NR_mq_getsetattr 237
515__SYSCALL(237, sys_mq_getsetattr, 3)
516#define __NR_available238 238
517__SYSCALL(238, sys_ni_syscall, 0)
518
519/* IO */
520
521#define __NR_io_setup 239
522__SYSCALL(239, sys_io_setup, 2)
523#define __NR_io_destroy 240
524__SYSCALL(240, sys_io_destroy, 1)
525#define __NR_io_submit 241
526__SYSCALL(241, sys_io_submit, 3)
527#define __NR_io_getevents 242
528__SYSCALL(242, sys_io_getevents, 5)
529#define __NR_io_cancel 243
530__SYSCALL(243, sys_io_cancel, 3)
531#define __NR_clock_settime 244
532__SYSCALL(244, sys_clock_settime, 2)
533#define __NR_clock_gettime 245
534__SYSCALL(245, sys_clock_gettime, 2)
535#define __NR_clock_getres 246
536__SYSCALL(246, sys_clock_getres, 2)
537#define __NR_clock_nanosleep 247
538__SYSCALL(247, sys_clock_nanosleep, 4)
539
540/* Timer */
541
542#define __NR_timer_create 248
543__SYSCALL(248, sys_timer_create, 3)
544#define __NR_timer_delete 249
545__SYSCALL(249, sys_timer_delete, 1)
546#define __NR_timer_settime 250
547__SYSCALL(250, sys_timer_settime, 4)
548#define __NR_timer_gettime 251
549__SYSCALL(251, sys_timer_gettime, 2)
550#define __NR_timer_getoverrun 252
551__SYSCALL(252, sys_timer_getoverrun, 1)
552
553/* System */
554
555#define __NR_reserved253 253
556__SYSCALL(253, sys_ni_syscall, 0)
557#define __NR_lookup_dcookie 254
558__SYSCALL(254, sys_lookup_dcookie, 4)
559#define __NR_available255 255
560__SYSCALL(255, sys_ni_syscall, 0)
561#define __NR_add_key 256
562__SYSCALL(256, sys_add_key, 5)
563#define __NR_request_key 257
564__SYSCALL(257, sys_request_key, 5)
565#define __NR_keyctl 258
566__SYSCALL(258, sys_keyctl, 5)
567#define __NR_available259 259
568__SYSCALL(259, sys_ni_syscall, 0)
569
570
571#define __NR_readahead 260
572__SYSCALL(260, sys_readahead, 5)
573#define __NR_remap_file_pages 261
574__SYSCALL(261, sys_remap_file_pages, 5)
575#define __NR_migrate_pages 262
576__SYSCALL(262, sys_migrate_pages, 0)
577#define __NR_mbind 263
578__SYSCALL(263, sys_mbind, 6)
579#define __NR_get_mempolicy 264
580__SYSCALL(264, sys_get_mempolicy, 5)
581#define __NR_set_mempolicy 265
582__SYSCALL(265, sys_set_mempolicy, 3)
583#define __NR_unshare 266
584__SYSCALL(266, sys_unshare, 1)
585#define __NR_move_pages 267
586__SYSCALL(267, sys_move_pages, 0)
587#define __NR_splice 268
588__SYSCALL(268, sys_splice, 0)
589#define __NR_tee 269
590__SYSCALL(269, sys_tee, 0)
591#define __NR_vmsplice 270
592__SYSCALL(270, sys_vmsplice, 0)
593#define __NR_available271 271
594__SYSCALL(271, sys_ni_syscall, 0)
595
596#define __NR_pselect6 272
597__SYSCALL(272, sys_pselect6, 0)
598#define __NR_ppoll 273
599__SYSCALL(273, sys_ppoll, 0)
600#define __NR_epoll_pwait 274
601__SYSCALL(274, sys_epoll_pwait, 0)
602#define __NR_epoll_create1 275
603__SYSCALL(275, sys_epoll_create1, 1)
604
605#define __NR_inotify_init 276
606__SYSCALL(276, sys_inotify_init, 0)
607#define __NR_inotify_add_watch 277
608__SYSCALL(277, sys_inotify_add_watch, 3)
609#define __NR_inotify_rm_watch 278
610__SYSCALL(278, sys_inotify_rm_watch, 2)
611#define __NR_inotify_init1 279
612__SYSCALL(279, sys_inotify_init1, 1)
613
614#define __NR_getcpu 280
615__SYSCALL(280, sys_getcpu, 0)
616#define __NR_kexec_load 281
617__SYSCALL(281, sys_ni_syscall, 0)
618
619#define __NR_ioprio_set 282
620__SYSCALL(282, sys_ioprio_set, 2)
621#define __NR_ioprio_get 283
622__SYSCALL(283, sys_ioprio_get, 3)
623
624#define __NR_set_robust_list 284
625__SYSCALL(284, sys_set_robust_list, 3)
626#define __NR_get_robust_list 285
627__SYSCALL(285, sys_get_robust_list, 3)
628#define __NR_available286 286
629__SYSCALL(286, sys_ni_syscall, 0)
630#define __NR_available287 287
631__SYSCALL(287, sys_ni_syscall, 0)
632
633/* Relative File Operations */
634
635#define __NR_openat 288
636__SYSCALL(288, sys_openat, 4)
637#define __NR_mkdirat 289
638__SYSCALL(289, sys_mkdirat, 3)
639#define __NR_mknodat 290
640__SYSCALL(290, sys_mknodat, 4)
641#define __NR_unlinkat 291
642__SYSCALL(291, sys_unlinkat, 3)
643#define __NR_renameat 292
644__SYSCALL(292, sys_renameat, 4)
645#define __NR_linkat 293
646__SYSCALL(293, sys_linkat, 5)
647#define __NR_symlinkat 294
648__SYSCALL(294, sys_symlinkat, 3)
649#define __NR_readlinkat 295
650__SYSCALL(295, sys_readlinkat, 4)
651#define __NR_utimensat 296
652__SYSCALL(296, sys_utimensat, 0)
653#define __NR_fchownat 297
654__SYSCALL(297, sys_fchownat, 5)
655#define __NR_futimesat 298
656__SYSCALL(298, sys_futimesat, 4)
657#define __NR_fstatat64 299
658__SYSCALL(299, sys_fstatat64, 0)
659#define __NR_fchmodat 300
660__SYSCALL(300, sys_fchmodat, 4)
661#define __NR_faccessat 301
662__SYSCALL(301, sys_faccessat, 4)
663#define __NR_available302 302
664__SYSCALL(302, sys_ni_syscall, 0)
665#define __NR_available303 303
666__SYSCALL(303, sys_ni_syscall, 0)
667
668#define __NR_signalfd 304
669__SYSCALL(304, sys_signalfd, 3)
670/* 305 was __NR_timerfd */
671__SYSCALL(305, sys_ni_syscall, 0)
672#define __NR_eventfd 306
673__SYSCALL(306, sys_eventfd, 1)
674#define __NR_recvmmsg 307
675__SYSCALL(307, sys_recvmmsg, 5)
676
677#define __NR_setns 308
678__SYSCALL(308, sys_setns, 2)
679#define __NR_signalfd4 309
680__SYSCALL(309, sys_signalfd4, 4)
681#define __NR_dup3 310
682__SYSCALL(310, sys_dup3, 3)
683#define __NR_pipe2 311
684__SYSCALL(311, sys_pipe2, 2)
685
686#define __NR_timerfd_create 312
687__SYSCALL(312, sys_timerfd_create, 2)
688#define __NR_timerfd_settime 313
689__SYSCALL(313, sys_timerfd_settime, 4)
690#define __NR_timerfd_gettime 314
691__SYSCALL(314, sys_timerfd_gettime, 2)
692#define __NR_available315 315
693__SYSCALL(315, sys_ni_syscall, 0)
694
695#define __NR_eventfd2 316
696__SYSCALL(316, sys_eventfd2, 2)
697#define __NR_preadv 317
698__SYSCALL(317, sys_preadv, 5)
699#define __NR_pwritev 318
700__SYSCALL(318, sys_pwritev, 5)
701#define __NR_available319 319
702__SYSCALL(319, sys_ni_syscall, 0)
703
704#define __NR_fanotify_init 320
705__SYSCALL(320, sys_fanotify_init, 2)
706#define __NR_fanotify_mark 321
707__SYSCALL(321, sys_fanotify_mark, 6)
708#define __NR_process_vm_readv 322
709__SYSCALL(322, sys_process_vm_readv, 6)
710#define __NR_process_vm_writev 323
711__SYSCALL(323, sys_process_vm_writev, 6)
712
713#define __NR_name_to_handle_at 324
714__SYSCALL(324, sys_name_to_handle_at, 5)
715#define __NR_open_by_handle_at 325
716__SYSCALL(325, sys_open_by_handle_at, 3)
717#define __NR_sync_file_range 326
718__SYSCALL(326, sys_sync_file_range2, 6)
719#define __NR_perf_event_open 327
720__SYSCALL(327, sys_perf_event_open, 5)
721
722#define __NR_rt_tgsigqueueinfo 328
723__SYSCALL(328, sys_rt_tgsigqueueinfo, 4)
724#define __NR_clock_adjtime 329
725__SYSCALL(329, sys_clock_adjtime, 2)
726#define __NR_prlimit64 330
727__SYSCALL(330, sys_prlimit64, 4)
728#define __NR_kcmp 331
729__SYSCALL(331, sys_kcmp, 5)
730
731
732#define __NR_syscall_count 332
733
734/*
735 * sysxtensa syscall handler
736 *
737 * int sysxtensa (SYS_XTENSA_ATOMIC_SET, ptr, val, unused);
738 * int sysxtensa (SYS_XTENSA_ATOMIC_ADD, ptr, val, unused);
739 * int sysxtensa (SYS_XTENSA_ATOMIC_EXG_ADD, ptr, val, unused);
740 * int sysxtensa (SYS_XTENSA_ATOMIC_CMP_SWP, ptr, oldval, newval);
741 * a2 a6 a3 a4 a5
742 */
743
744#define SYS_XTENSA_RESERVED 0 /* don't use this */
745#define SYS_XTENSA_ATOMIC_SET 1 /* set variable */
746#define SYS_XTENSA_ATOMIC_EXG_ADD 2 /* exchange memory and add */
747#define SYS_XTENSA_ATOMIC_ADD 3 /* add to memory */
748#define SYS_XTENSA_ATOMIC_CMP_SWP 4 /* compare and swap */
749
750#define SYS_XTENSA_COUNT 5 /* count */
751
752#undef __SYSCALL
753
754#endif /* _UAPI_XTENSA_UNISTD_H */