aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-10-10 07:09:31 -0400
committerDavid Howells <dhowells@redhat.com>2012-10-10 07:09:31 -0400
commit83b9d3a082a6e5281b5b5fc45337270d915af39d (patch)
treee93c546ddcb9b656861efc5c884df77be6d917ad /arch/avr32
parent42859eea96ba6beabfb0369a1eeffa3c7d2bd9cb (diff)
UAPI: (Scripted) Disintegrate arch/avr32/include/asm
Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'arch/avr32')
-rw-r--r--arch/avr32/include/asm/Kbuild3
-rw-r--r--arch/avr32/include/asm/param.h18
-rw-r--r--arch/avr32/include/asm/ptrace.h115
-rw-r--r--arch/avr32/include/asm/setup.h5
-rw-r--r--arch/avr32/include/asm/signal.h121
-rw-r--r--arch/avr32/include/asm/termios.h41
-rw-r--r--arch/avr32/include/asm/types.h6
-rw-r--r--arch/avr32/include/asm/unistd.h296
-rw-r--r--arch/avr32/include/uapi/asm/Kbuild32
-rw-r--r--arch/avr32/include/uapi/asm/auxvec.h (renamed from arch/avr32/include/asm/auxvec.h)0
-rw-r--r--arch/avr32/include/uapi/asm/bitsperlong.h (renamed from arch/avr32/include/asm/bitsperlong.h)0
-rw-r--r--arch/avr32/include/uapi/asm/byteorder.h (renamed from arch/avr32/include/asm/byteorder.h)0
-rw-r--r--arch/avr32/include/uapi/asm/cachectl.h (renamed from arch/avr32/include/asm/cachectl.h)0
-rw-r--r--arch/avr32/include/uapi/asm/errno.h (renamed from arch/avr32/include/asm/errno.h)0
-rw-r--r--arch/avr32/include/uapi/asm/fcntl.h (renamed from arch/avr32/include/asm/fcntl.h)0
-rw-r--r--arch/avr32/include/uapi/asm/ioctl.h (renamed from arch/avr32/include/asm/ioctl.h)0
-rw-r--r--arch/avr32/include/uapi/asm/ioctls.h (renamed from arch/avr32/include/asm/ioctls.h)0
-rw-r--r--arch/avr32/include/uapi/asm/ipcbuf.h (renamed from arch/avr32/include/asm/ipcbuf.h)0
-rw-r--r--arch/avr32/include/uapi/asm/kvm_para.h (renamed from arch/avr32/include/asm/kvm_para.h)0
-rw-r--r--arch/avr32/include/uapi/asm/mman.h (renamed from arch/avr32/include/asm/mman.h)0
-rw-r--r--arch/avr32/include/uapi/asm/msgbuf.h (renamed from arch/avr32/include/asm/msgbuf.h)0
-rw-r--r--arch/avr32/include/uapi/asm/param.h18
-rw-r--r--arch/avr32/include/uapi/asm/poll.h (renamed from arch/avr32/include/asm/poll.h)0
-rw-r--r--arch/avr32/include/uapi/asm/posix_types.h (renamed from arch/avr32/include/asm/posix_types.h)0
-rw-r--r--arch/avr32/include/uapi/asm/ptrace.h126
-rw-r--r--arch/avr32/include/uapi/asm/resource.h (renamed from arch/avr32/include/asm/resource.h)0
-rw-r--r--arch/avr32/include/uapi/asm/sembuf.h (renamed from arch/avr32/include/asm/sembuf.h)0
-rw-r--r--arch/avr32/include/uapi/asm/setup.h17
-rw-r--r--arch/avr32/include/uapi/asm/shmbuf.h (renamed from arch/avr32/include/asm/shmbuf.h)0
-rw-r--r--arch/avr32/include/uapi/asm/sigcontext.h (renamed from arch/avr32/include/asm/sigcontext.h)0
-rw-r--r--arch/avr32/include/uapi/asm/siginfo.h (renamed from arch/avr32/include/asm/siginfo.h)0
-rw-r--r--arch/avr32/include/uapi/asm/signal.h128
-rw-r--r--arch/avr32/include/uapi/asm/socket.h (renamed from arch/avr32/include/asm/socket.h)0
-rw-r--r--arch/avr32/include/uapi/asm/sockios.h (renamed from arch/avr32/include/asm/sockios.h)0
-rw-r--r--arch/avr32/include/uapi/asm/stat.h (renamed from arch/avr32/include/asm/stat.h)0
-rw-r--r--arch/avr32/include/uapi/asm/statfs.h (renamed from arch/avr32/include/asm/statfs.h)0
-rw-r--r--arch/avr32/include/uapi/asm/swab.h (renamed from arch/avr32/include/asm/swab.h)0
-rw-r--r--arch/avr32/include/uapi/asm/termbits.h (renamed from arch/avr32/include/asm/termbits.h)0
-rw-r--r--arch/avr32/include/uapi/asm/termios.h50
-rw-r--r--arch/avr32/include/uapi/asm/types.h8
-rw-r--r--arch/avr32/include/uapi/asm/unistd.h305
41 files changed, 692 insertions, 597 deletions
diff --git a/arch/avr32/include/asm/Kbuild b/arch/avr32/include/asm/Kbuild
index be0433ee5a8e..4807ded352c5 100644
--- a/arch/avr32/include/asm/Kbuild
+++ b/arch/avr32/include/asm/Kbuild
@@ -1,6 +1,3 @@
1include include/asm-generic/Kbuild.asm
2 1
3generic-y += clkdev.h 2generic-y += clkdev.h
4generic-y += exec.h 3generic-y += exec.h
5
6header-y += cachectl.h
diff --git a/arch/avr32/include/asm/param.h b/arch/avr32/include/asm/param.h
index 34bc8d4c3b29..009a167aea1f 100644
--- a/arch/avr32/include/asm/param.h
+++ b/arch/avr32/include/asm/param.h
@@ -1,23 +1,9 @@
1#ifndef __ASM_AVR32_PARAM_H 1#ifndef __ASM_AVR32_PARAM_H
2#define __ASM_AVR32_PARAM_H 2#define __ASM_AVR32_PARAM_H
3 3
4#ifdef __KERNEL__ 4#include <uapi/asm/param.h>
5
5# define HZ CONFIG_HZ 6# define HZ CONFIG_HZ
6# define USER_HZ 100 /* User interfaces are in "ticks" */ 7# define USER_HZ 100 /* User interfaces are in "ticks" */
7# define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */ 8# define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */
8#endif
9
10#ifndef HZ
11# define HZ 100
12#endif
13
14/* TODO: Should be configurable */
15#define EXEC_PAGESIZE 4096
16
17#ifndef NOGROUP
18# define NOGROUP (-1)
19#endif
20
21#define MAXHOSTNAMELEN 64
22
23#endif /* __ASM_AVR32_PARAM_H */ 9#endif /* __ASM_AVR32_PARAM_H */
diff --git a/arch/avr32/include/asm/ptrace.h b/arch/avr32/include/asm/ptrace.h
index c67a007f672a..8d3c412fc65f 100644
--- a/arch/avr32/include/asm/ptrace.h
+++ b/arch/avr32/include/asm/ptrace.h
@@ -8,119 +8,9 @@
8#ifndef __ASM_AVR32_PTRACE_H 8#ifndef __ASM_AVR32_PTRACE_H
9#define __ASM_AVR32_PTRACE_H 9#define __ASM_AVR32_PTRACE_H
10 10
11#define PTRACE_GETREGS 12 11#include <uapi/asm/ptrace.h>
12#define PTRACE_SETREGS 13
13
14/*
15 * Status Register bits
16 */
17#define SR_H 0x20000000
18#define SR_J 0x10000000
19#define SR_DM 0x08000000
20#define SR_D 0x04000000
21#define MODE_NMI 0x01c00000
22#define MODE_EXCEPTION 0x01800000
23#define MODE_INT3 0x01400000
24#define MODE_INT2 0x01000000
25#define MODE_INT1 0x00c00000
26#define MODE_INT0 0x00800000
27#define MODE_SUPERVISOR 0x00400000
28#define MODE_USER 0x00000000
29#define MODE_MASK 0x01c00000
30#define SR_EM 0x00200000
31#define SR_I3M 0x00100000
32#define SR_I2M 0x00080000
33#define SR_I1M 0x00040000
34#define SR_I0M 0x00020000
35#define SR_GM 0x00010000
36
37#define SR_H_BIT 29
38#define SR_J_BIT 28
39#define SR_DM_BIT 27
40#define SR_D_BIT 26
41#define MODE_SHIFT 22
42#define SR_EM_BIT 21
43#define SR_I3M_BIT 20
44#define SR_I2M_BIT 19
45#define SR_I1M_BIT 18
46#define SR_I0M_BIT 17
47#define SR_GM_BIT 16
48
49/* The user-visible part */
50#define SR_L 0x00000020
51#define SR_Q 0x00000010
52#define SR_V 0x00000008
53#define SR_N 0x00000004
54#define SR_Z 0x00000002
55#define SR_C 0x00000001
56
57#define SR_L_BIT 5
58#define SR_Q_BIT 4
59#define SR_V_BIT 3
60#define SR_N_BIT 2
61#define SR_Z_BIT 1
62#define SR_C_BIT 0
63
64/*
65 * The order is defined by the stmts instruction. r0 is stored first,
66 * so it gets the highest address.
67 *
68 * Registers 0-12 are general-purpose registers (r12 is normally used for
69 * the function return value).
70 * Register 13 is the stack pointer
71 * Register 14 is the link register
72 * Register 15 is the program counter (retrieved from the RAR sysreg)
73 */
74#define FRAME_SIZE_FULL 72
75#define REG_R12_ORIG 68
76#define REG_R0 64
77#define REG_R1 60
78#define REG_R2 56
79#define REG_R3 52
80#define REG_R4 48
81#define REG_R5 44
82#define REG_R6 40
83#define REG_R7 36
84#define REG_R8 32
85#define REG_R9 28
86#define REG_R10 24
87#define REG_R11 20
88#define REG_R12 16
89#define REG_SP 12
90#define REG_LR 8
91
92#define FRAME_SIZE_MIN 8
93#define REG_PC 4
94#define REG_SR 0
95 12
96#ifndef __ASSEMBLY__ 13#ifndef __ASSEMBLY__
97struct pt_regs {
98 /* These are always saved */
99 unsigned long sr;
100 unsigned long pc;
101
102 /* These are sometimes saved */
103 unsigned long lr;
104 unsigned long sp;
105 unsigned long r12;
106 unsigned long r11;
107 unsigned long r10;
108 unsigned long r9;
109 unsigned long r8;
110 unsigned long r7;
111 unsigned long r6;
112 unsigned long r5;
113 unsigned long r4;
114 unsigned long r3;
115 unsigned long r2;
116 unsigned long r1;
117 unsigned long r0;
118
119 /* Only saved on system call */
120 unsigned long r12_orig;
121};
122
123#ifdef __KERNEL__
124 14
125#include <asm/ocd.h> 15#include <asm/ocd.h>
126 16
@@ -150,8 +40,5 @@ static __inline__ int valid_user_regs(struct pt_regs *regs)
150} 40}
151 41
152 42
153#endif /* __KERNEL__ */
154
155#endif /* ! __ASSEMBLY__ */ 43#endif /* ! __ASSEMBLY__ */
156
157#endif /* __ASM_AVR32_PTRACE_H */ 44#endif /* __ASM_AVR32_PTRACE_H */
diff --git a/arch/avr32/include/asm/setup.h b/arch/avr32/include/asm/setup.h
index 160543dbec7e..73490ae0c476 100644
--- a/arch/avr32/include/asm/setup.h
+++ b/arch/avr32/include/asm/setup.h
@@ -11,9 +11,8 @@
11#ifndef __ASM_AVR32_SETUP_H__ 11#ifndef __ASM_AVR32_SETUP_H__
12#define __ASM_AVR32_SETUP_H__ 12#define __ASM_AVR32_SETUP_H__
13 13
14#define COMMAND_LINE_SIZE 256 14#include <uapi/asm/setup.h>
15 15
16#ifdef __KERNEL__
17 16
18/* Magic number indicating that a tag table is present */ 17/* Magic number indicating that a tag table is present */
19#define ATAG_MAGIC 0xa2a25441 18#define ATAG_MAGIC 0xa2a25441
@@ -142,6 +141,4 @@ void setup_processor(void);
142 141
143#endif /* !__ASSEMBLY__ */ 142#endif /* !__ASSEMBLY__ */
144 143
145#endif /* __KERNEL__ */
146
147#endif /* __ASM_AVR32_SETUP_H__ */ 144#endif /* __ASM_AVR32_SETUP_H__ */
diff --git a/arch/avr32/include/asm/signal.h b/arch/avr32/include/asm/signal.h
index ae56849fdb2b..4d502fd6bad3 100644
--- a/arch/avr32/include/asm/signal.h
+++ b/arch/avr32/include/asm/signal.h
@@ -8,12 +8,8 @@
8#ifndef __ASM_AVR32_SIGNAL_H 8#ifndef __ASM_AVR32_SIGNAL_H
9#define __ASM_AVR32_SIGNAL_H 9#define __ASM_AVR32_SIGNAL_H
10 10
11#include <linux/types.h> 11#include <uapi/asm/signal.h>
12 12
13/* Avoid too many header ordering problems. */
14struct siginfo;
15
16#ifdef __KERNEL__
17/* Most things should be clean enough to redefine this at will, if care 13/* Most things should be clean enough to redefine this at will, if care
18 is taken to make libc match. */ 14 is taken to make libc match. */
19 15
@@ -27,94 +23,6 @@ typedef struct {
27 unsigned long sig[_NSIG_WORDS]; 23 unsigned long sig[_NSIG_WORDS];
28} sigset_t; 24} sigset_t;
29 25
30#else
31/* Here we must cater to libcs that poke about in kernel headers. */
32
33#define NSIG 32
34typedef unsigned long sigset_t;
35
36#endif /* __KERNEL__ */
37
38#define SIGHUP 1
39#define SIGINT 2
40#define SIGQUIT 3
41#define SIGILL 4
42#define SIGTRAP 5
43#define SIGABRT 6
44#define SIGIOT 6
45#define SIGBUS 7
46#define SIGFPE 8
47#define SIGKILL 9
48#define SIGUSR1 10
49#define SIGSEGV 11
50#define SIGUSR2 12
51#define SIGPIPE 13
52#define SIGALRM 14
53#define SIGTERM 15
54#define SIGSTKFLT 16
55#define SIGCHLD 17
56#define SIGCONT 18
57#define SIGSTOP 19
58#define SIGTSTP 20
59#define SIGTTIN 21
60#define SIGTTOU 22
61#define SIGURG 23
62#define SIGXCPU 24
63#define SIGXFSZ 25
64#define SIGVTALRM 26
65#define SIGPROF 27
66#define SIGWINCH 28
67#define SIGIO 29
68#define SIGPOLL SIGIO
69/*
70#define SIGLOST 29
71*/
72#define SIGPWR 30
73#define SIGSYS 31
74#define SIGUNUSED 31
75
76/* These should not be considered constants from userland. */
77#define SIGRTMIN 32
78#define SIGRTMAX (_NSIG-1)
79
80/*
81 * SA_FLAGS values:
82 *
83 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
84 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
85 * SA_SIGINFO deliver the signal with SIGINFO structs
86 * SA_ONSTACK indicates that a registered stack_t will be used.
87 * SA_RESTART flag to get restarting signals (which were the default long ago)
88 * SA_NODEFER prevents the current signal from being masked in the handler.
89 * SA_RESETHAND clears the handler when the signal is delivered.
90 *
91 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
92 * Unix names RESETHAND and NODEFER respectively.
93 */
94#define SA_NOCLDSTOP 0x00000001
95#define SA_NOCLDWAIT 0x00000002
96#define SA_SIGINFO 0x00000004
97#define SA_RESTORER 0x04000000
98#define SA_ONSTACK 0x08000000
99#define SA_RESTART 0x10000000
100#define SA_NODEFER 0x40000000
101#define SA_RESETHAND 0x80000000
102
103#define SA_NOMASK SA_NODEFER
104#define SA_ONESHOT SA_RESETHAND
105
106/*
107 * sigaltstack controls
108 */
109#define SS_ONSTACK 1
110#define SS_DISABLE 2
111
112#define MINSIGSTKSZ 2048
113#define SIGSTKSZ 8192
114
115#include <asm-generic/signal-defs.h>
116
117#ifdef __KERNEL__
118struct sigaction { 26struct sigaction {
119 __sighandler_t sa_handler; 27 __sighandler_t sa_handler;
120 unsigned long sa_flags; 28 unsigned long sa_flags;
@@ -125,37 +33,10 @@ struct sigaction {
125struct k_sigaction { 33struct k_sigaction {
126 struct sigaction sa; 34 struct sigaction sa;
127}; 35};
128#else
129/* Here we must cater to libcs that poke about in kernel headers. */
130
131struct sigaction {
132 union {
133 __sighandler_t _sa_handler;
134 void (*_sa_sigaction)(int, struct siginfo *, void *);
135 } _u;
136 sigset_t sa_mask;
137 unsigned long sa_flags;
138 void (*sa_restorer)(void);
139};
140
141#define sa_handler _u._sa_handler
142#define sa_sigaction _u._sa_sigaction
143
144#endif /* __KERNEL__ */
145
146typedef struct sigaltstack {
147 void __user *ss_sp;
148 int ss_flags;
149 size_t ss_size;
150} stack_t;
151
152#ifdef __KERNEL__
153 36
154#include <asm/sigcontext.h> 37#include <asm/sigcontext.h>
155#undef __HAVE_ARCH_SIG_BITOPS 38#undef __HAVE_ARCH_SIG_BITOPS
156 39
157#define ptrace_signal_deliver(regs, cookie) do { } while (0) 40#define ptrace_signal_deliver(regs, cookie) do { } while (0)
158 41
159#endif /* __KERNEL__ */
160
161#endif 42#endif
diff --git a/arch/avr32/include/asm/termios.h b/arch/avr32/include/asm/termios.h
index dd7e9da25488..9d594376dbd6 100644
--- a/arch/avr32/include/asm/termios.h
+++ b/arch/avr32/include/asm/termios.h
@@ -8,45 +8,8 @@
8#ifndef __ASM_AVR32_TERMIOS_H 8#ifndef __ASM_AVR32_TERMIOS_H
9#define __ASM_AVR32_TERMIOS_H 9#define __ASM_AVR32_TERMIOS_H
10 10
11#include <asm/termbits.h> 11#include <uapi/asm/termios.h>
12#include <asm/ioctls.h>
13 12
14struct winsize {
15 unsigned short ws_row;
16 unsigned short ws_col;
17 unsigned short ws_xpixel;
18 unsigned short ws_ypixel;
19};
20
21#define NCC 8
22struct termio {
23 unsigned short c_iflag; /* input mode flags */
24 unsigned short c_oflag; /* output mode flags */
25 unsigned short c_cflag; /* control mode flags */
26 unsigned short c_lflag; /* local mode flags */
27 unsigned char c_line; /* line discipline */
28 unsigned char c_cc[NCC]; /* control characters */
29};
30
31/* modem lines */
32#define TIOCM_LE 0x001
33#define TIOCM_DTR 0x002
34#define TIOCM_RTS 0x004
35#define TIOCM_ST 0x008
36#define TIOCM_SR 0x010
37#define TIOCM_CTS 0x020
38#define TIOCM_CAR 0x040
39#define TIOCM_RNG 0x080
40#define TIOCM_DSR 0x100
41#define TIOCM_CD TIOCM_CAR
42#define TIOCM_RI TIOCM_RNG
43#define TIOCM_OUT1 0x2000
44#define TIOCM_OUT2 0x4000
45#define TIOCM_LOOP 0x8000
46
47/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
48
49#ifdef __KERNEL__
50/* intr=^C quit=^\ erase=del kill=^U 13/* intr=^C quit=^\ erase=del kill=^U
51 eof=^D vtime=\0 vmin=\1 sxtc=\0 14 eof=^D vtime=\0 vmin=\1 sxtc=\0
52 start=^Q stop=^S susp=^Z eol=\0 15 start=^Q stop=^S susp=^Z eol=\0
@@ -57,6 +20,4 @@ struct termio {
57 20
58#include <asm-generic/termios-base.h> 21#include <asm-generic/termios-base.h>
59 22
60#endif /* __KERNEL__ */
61
62#endif /* __ASM_AVR32_TERMIOS_H */ 23#endif /* __ASM_AVR32_TERMIOS_H */
diff --git a/arch/avr32/include/asm/types.h b/arch/avr32/include/asm/types.h
index 9bb2d8b2e6ca..59324058069c 100644
--- a/arch/avr32/include/asm/types.h
+++ b/arch/avr32/include/asm/types.h
@@ -8,16 +8,12 @@
8#ifndef __ASM_AVR32_TYPES_H 8#ifndef __ASM_AVR32_TYPES_H
9#define __ASM_AVR32_TYPES_H 9#define __ASM_AVR32_TYPES_H
10 10
11#include <asm-generic/int-ll64.h> 11#include <uapi/asm/types.h>
12 12
13/* 13/*
14 * These aren't exported outside the kernel to avoid name space clashes 14 * These aren't exported outside the kernel to avoid name space clashes
15 */ 15 */
16#ifdef __KERNEL__
17 16
18#define BITS_PER_LONG 32 17#define BITS_PER_LONG 32
19 18
20#endif /* __KERNEL__ */
21
22
23#endif /* __ASM_AVR32_TYPES_H */ 19#endif /* __ASM_AVR32_TYPES_H */
diff --git a/arch/avr32/include/asm/unistd.h b/arch/avr32/include/asm/unistd.h
index 1358e366f4be..157b4bd3d5e5 100644
--- a/arch/avr32/include/asm/unistd.h
+++ b/arch/avr32/include/asm/unistd.h
@@ -8,300 +8,8 @@
8#ifndef __ASM_AVR32_UNISTD_H 8#ifndef __ASM_AVR32_UNISTD_H
9#define __ASM_AVR32_UNISTD_H 9#define __ASM_AVR32_UNISTD_H
10 10
11/* 11#include <uapi/asm/unistd.h>
12 * This file contains the system call numbers.
13 */
14
15#define __NR_restart_syscall 0
16#define __NR_exit 1
17#define __NR_fork 2
18#define __NR_read 3
19#define __NR_write 4
20#define __NR_open 5
21#define __NR_close 6
22#define __NR_umask 7
23#define __NR_creat 8
24#define __NR_link 9
25#define __NR_unlink 10
26#define __NR_execve 11
27#define __NR_chdir 12
28#define __NR_time 13
29#define __NR_mknod 14
30#define __NR_chmod 15
31#define __NR_chown 16
32#define __NR_lchown 17
33#define __NR_lseek 18
34#define __NR__llseek 19
35#define __NR_getpid 20
36#define __NR_mount 21
37#define __NR_umount2 22
38#define __NR_setuid 23
39#define __NR_getuid 24
40#define __NR_stime 25
41#define __NR_ptrace 26
42#define __NR_alarm 27
43#define __NR_pause 28
44#define __NR_utime 29
45#define __NR_stat 30
46#define __NR_fstat 31
47#define __NR_lstat 32
48#define __NR_access 33
49#define __NR_chroot 34
50#define __NR_sync 35
51#define __NR_fsync 36
52#define __NR_kill 37
53#define __NR_rename 38
54#define __NR_mkdir 39
55#define __NR_rmdir 40
56#define __NR_dup 41
57#define __NR_pipe 42
58#define __NR_times 43
59#define __NR_clone 44
60#define __NR_brk 45
61#define __NR_setgid 46
62#define __NR_getgid 47
63#define __NR_getcwd 48
64#define __NR_geteuid 49
65#define __NR_getegid 50
66#define __NR_acct 51
67#define __NR_setfsuid 52
68#define __NR_setfsgid 53
69#define __NR_ioctl 54
70#define __NR_fcntl 55
71#define __NR_setpgid 56
72#define __NR_mremap 57
73#define __NR_setresuid 58
74#define __NR_getresuid 59
75#define __NR_setreuid 60
76#define __NR_setregid 61
77#define __NR_ustat 62
78#define __NR_dup2 63
79#define __NR_getppid 64
80#define __NR_getpgrp 65
81#define __NR_setsid 66
82#define __NR_rt_sigaction 67
83#define __NR_rt_sigreturn 68
84#define __NR_rt_sigprocmask 69
85#define __NR_rt_sigpending 70
86#define __NR_rt_sigtimedwait 71
87#define __NR_rt_sigqueueinfo 72
88#define __NR_rt_sigsuspend 73
89#define __NR_sethostname 74
90#define __NR_setrlimit 75
91#define __NR_getrlimit 76 /* SuS compliant getrlimit */
92#define __NR_getrusage 77
93#define __NR_gettimeofday 78
94#define __NR_settimeofday 79
95#define __NR_getgroups 80
96#define __NR_setgroups 81
97#define __NR_select 82
98#define __NR_symlink 83
99#define __NR_fchdir 84
100#define __NR_readlink 85
101#define __NR_pread 86
102#define __NR_pwrite 87
103#define __NR_swapon 88
104#define __NR_reboot 89
105#define __NR_mmap2 90
106#define __NR_munmap 91
107#define __NR_truncate 92
108#define __NR_ftruncate 93
109#define __NR_fchmod 94
110#define __NR_fchown 95
111#define __NR_getpriority 96
112#define __NR_setpriority 97
113#define __NR_wait4 98
114#define __NR_statfs 99
115#define __NR_fstatfs 100
116#define __NR_vhangup 101
117#define __NR_sigaltstack 102
118#define __NR_syslog 103
119#define __NR_setitimer 104
120#define __NR_getitimer 105
121#define __NR_swapoff 106
122#define __NR_sysinfo 107
123/* 108 was __NR_ipc for a little while */
124#define __NR_sendfile 109
125#define __NR_setdomainname 110
126#define __NR_uname 111
127#define __NR_adjtimex 112
128#define __NR_mprotect 113
129#define __NR_vfork 114
130#define __NR_init_module 115
131#define __NR_delete_module 116
132#define __NR_quotactl 117
133#define __NR_getpgid 118
134#define __NR_bdflush 119
135#define __NR_sysfs 120
136#define __NR_personality 121
137#define __NR_afs_syscall 122 /* Syscall for Andrew File System */
138#define __NR_getdents 123
139#define __NR_flock 124
140#define __NR_msync 125
141#define __NR_readv 126
142#define __NR_writev 127
143#define __NR_getsid 128
144#define __NR_fdatasync 129
145#define __NR__sysctl 130
146#define __NR_mlock 131
147#define __NR_munlock 132
148#define __NR_mlockall 133
149#define __NR_munlockall 134
150#define __NR_sched_setparam 135
151#define __NR_sched_getparam 136
152#define __NR_sched_setscheduler 137
153#define __NR_sched_getscheduler 138
154#define __NR_sched_yield 139
155#define __NR_sched_get_priority_max 140
156#define __NR_sched_get_priority_min 141
157#define __NR_sched_rr_get_interval 142
158#define __NR_nanosleep 143
159#define __NR_poll 144
160#define __NR_nfsservctl 145
161#define __NR_setresgid 146
162#define __NR_getresgid 147
163#define __NR_prctl 148
164#define __NR_socket 149
165#define __NR_bind 150
166#define __NR_connect 151
167#define __NR_listen 152
168#define __NR_accept 153
169#define __NR_getsockname 154
170#define __NR_getpeername 155
171#define __NR_socketpair 156
172#define __NR_send 157
173#define __NR_recv 158
174#define __NR_sendto 159
175#define __NR_recvfrom 160
176#define __NR_shutdown 161
177#define __NR_setsockopt 162
178#define __NR_getsockopt 163
179#define __NR_sendmsg 164
180#define __NR_recvmsg 165
181#define __NR_truncate64 166
182#define __NR_ftruncate64 167
183#define __NR_stat64 168
184#define __NR_lstat64 169
185#define __NR_fstat64 170
186#define __NR_pivot_root 171
187#define __NR_mincore 172
188#define __NR_madvise 173
189#define __NR_getdents64 174
190#define __NR_fcntl64 175
191#define __NR_gettid 176
192#define __NR_readahead 177
193#define __NR_setxattr 178
194#define __NR_lsetxattr 179
195#define __NR_fsetxattr 180
196#define __NR_getxattr 181
197#define __NR_lgetxattr 182
198#define __NR_fgetxattr 183
199#define __NR_listxattr 184
200#define __NR_llistxattr 185
201#define __NR_flistxattr 186
202#define __NR_removexattr 187
203#define __NR_lremovexattr 188
204#define __NR_fremovexattr 189
205#define __NR_tkill 190
206#define __NR_sendfile64 191
207#define __NR_futex 192
208#define __NR_sched_setaffinity 193
209#define __NR_sched_getaffinity 194
210#define __NR_capget 195
211#define __NR_capset 196
212#define __NR_io_setup 197
213#define __NR_io_destroy 198
214#define __NR_io_getevents 199
215#define __NR_io_submit 200
216#define __NR_io_cancel 201
217#define __NR_fadvise64 202
218#define __NR_exit_group 203
219#define __NR_lookup_dcookie 204
220#define __NR_epoll_create 205
221#define __NR_epoll_ctl 206
222#define __NR_epoll_wait 207
223#define __NR_remap_file_pages 208
224#define __NR_set_tid_address 209
225
226#define __NR_timer_create 210
227#define __NR_timer_settime 211
228#define __NR_timer_gettime 212
229#define __NR_timer_getoverrun 213
230#define __NR_timer_delete 214
231#define __NR_clock_settime 215
232#define __NR_clock_gettime 216
233#define __NR_clock_getres 217
234#define __NR_clock_nanosleep 218
235#define __NR_statfs64 219
236#define __NR_fstatfs64 220
237#define __NR_tgkill 221
238 /* 222 reserved for tux */
239#define __NR_utimes 223
240#define __NR_fadvise64_64 224
241
242#define __NR_cacheflush 225
243 12
244#define __NR_vserver 226
245#define __NR_mq_open 227
246#define __NR_mq_unlink 228
247#define __NR_mq_timedsend 229
248#define __NR_mq_timedreceive 230
249#define __NR_mq_notify 231
250#define __NR_mq_getsetattr 232
251#define __NR_kexec_load 233
252#define __NR_waitid 234
253#define __NR_add_key 235
254#define __NR_request_key 236
255#define __NR_keyctl 237
256#define __NR_ioprio_set 238
257#define __NR_ioprio_get 239
258#define __NR_inotify_init 240
259#define __NR_inotify_add_watch 241
260#define __NR_inotify_rm_watch 242
261#define __NR_openat 243
262#define __NR_mkdirat 244
263#define __NR_mknodat 245
264#define __NR_fchownat 246
265#define __NR_futimesat 247
266#define __NR_fstatat64 248
267#define __NR_unlinkat 249
268#define __NR_renameat 250
269#define __NR_linkat 251
270#define __NR_symlinkat 252
271#define __NR_readlinkat 253
272#define __NR_fchmodat 254
273#define __NR_faccessat 255
274#define __NR_pselect6 256
275#define __NR_ppoll 257
276#define __NR_unshare 258
277#define __NR_set_robust_list 259
278#define __NR_get_robust_list 260
279#define __NR_splice 261
280#define __NR_sync_file_range 262
281#define __NR_tee 263
282#define __NR_vmsplice 264
283#define __NR_epoll_pwait 265
284
285#define __NR_msgget 266
286#define __NR_msgsnd 267
287#define __NR_msgrcv 268
288#define __NR_msgctl 269
289#define __NR_semget 270
290#define __NR_semop 271
291#define __NR_semctl 272
292#define __NR_semtimedop 273
293#define __NR_shmat 274
294#define __NR_shmget 275
295#define __NR_shmdt 276
296#define __NR_shmctl 277
297
298#define __NR_utimensat 278
299#define __NR_signalfd 279
300/* 280 was __NR_timerfd */
301#define __NR_eventfd 281
302#define __NR_setns 283
303
304#ifdef __KERNEL__
305#define NR_syscalls 284 13#define NR_syscalls 284
306 14
307/* Old stuff */ 15/* Old stuff */
@@ -340,6 +48,4 @@
340 */ 48 */
341#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall"); 49#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
342 50
343#endif /* __KERNEL__ */
344
345#endif /* __ASM_AVR32_UNISTD_H */ 51#endif /* __ASM_AVR32_UNISTD_H */
diff --git a/arch/avr32/include/uapi/asm/Kbuild b/arch/avr32/include/uapi/asm/Kbuild
index baebb3da1d44..df53e7a46774 100644
--- a/arch/avr32/include/uapi/asm/Kbuild
+++ b/arch/avr32/include/uapi/asm/Kbuild
@@ -1,3 +1,35 @@
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 += shmbuf.h
24header-y += sigcontext.h
25header-y += siginfo.h
26header-y += signal.h
27header-y += socket.h
28header-y += sockios.h
29header-y += stat.h
30header-y += statfs.h
31header-y += swab.h
32header-y += termbits.h
33header-y += termios.h
34header-y += types.h
35header-y += unistd.h
diff --git a/arch/avr32/include/asm/auxvec.h b/arch/avr32/include/uapi/asm/auxvec.h
index d5dd435bf8f4..d5dd435bf8f4 100644
--- a/arch/avr32/include/asm/auxvec.h
+++ b/arch/avr32/include/uapi/asm/auxvec.h
diff --git a/arch/avr32/include/asm/bitsperlong.h b/arch/avr32/include/uapi/asm/bitsperlong.h
index 6dc0bb0c13b2..6dc0bb0c13b2 100644
--- a/arch/avr32/include/asm/bitsperlong.h
+++ b/arch/avr32/include/uapi/asm/bitsperlong.h
diff --git a/arch/avr32/include/asm/byteorder.h b/arch/avr32/include/uapi/asm/byteorder.h
index 50abc21619a8..50abc21619a8 100644
--- a/arch/avr32/include/asm/byteorder.h
+++ b/arch/avr32/include/uapi/asm/byteorder.h
diff --git a/arch/avr32/include/asm/cachectl.h b/arch/avr32/include/uapi/asm/cachectl.h
index 4faf1ce60061..4faf1ce60061 100644
--- a/arch/avr32/include/asm/cachectl.h
+++ b/arch/avr32/include/uapi/asm/cachectl.h
diff --git a/arch/avr32/include/asm/errno.h b/arch/avr32/include/uapi/asm/errno.h
index 558a7249f06d..558a7249f06d 100644
--- a/arch/avr32/include/asm/errno.h
+++ b/arch/avr32/include/uapi/asm/errno.h
diff --git a/arch/avr32/include/asm/fcntl.h b/arch/avr32/include/uapi/asm/fcntl.h
index 14c0c4402b11..14c0c4402b11 100644
--- a/arch/avr32/include/asm/fcntl.h
+++ b/arch/avr32/include/uapi/asm/fcntl.h
diff --git a/arch/avr32/include/asm/ioctl.h b/arch/avr32/include/uapi/asm/ioctl.h
index c8472c1398ef..c8472c1398ef 100644
--- a/arch/avr32/include/asm/ioctl.h
+++ b/arch/avr32/include/uapi/asm/ioctl.h
diff --git a/arch/avr32/include/asm/ioctls.h b/arch/avr32/include/uapi/asm/ioctls.h
index 909cf66feaf5..909cf66feaf5 100644
--- a/arch/avr32/include/asm/ioctls.h
+++ b/arch/avr32/include/uapi/asm/ioctls.h
diff --git a/arch/avr32/include/asm/ipcbuf.h b/arch/avr32/include/uapi/asm/ipcbuf.h
index 84c7e51cb6d0..84c7e51cb6d0 100644
--- a/arch/avr32/include/asm/ipcbuf.h
+++ b/arch/avr32/include/uapi/asm/ipcbuf.h
diff --git a/arch/avr32/include/asm/kvm_para.h b/arch/avr32/include/uapi/asm/kvm_para.h
index 14fab8f0b957..14fab8f0b957 100644
--- a/arch/avr32/include/asm/kvm_para.h
+++ b/arch/avr32/include/uapi/asm/kvm_para.h
diff --git a/arch/avr32/include/asm/mman.h b/arch/avr32/include/uapi/asm/mman.h
index 8eebf89f5ab1..8eebf89f5ab1 100644
--- a/arch/avr32/include/asm/mman.h
+++ b/arch/avr32/include/uapi/asm/mman.h
diff --git a/arch/avr32/include/asm/msgbuf.h b/arch/avr32/include/uapi/asm/msgbuf.h
index ac18bc4da7f7..ac18bc4da7f7 100644
--- a/arch/avr32/include/asm/msgbuf.h
+++ b/arch/avr32/include/uapi/asm/msgbuf.h
diff --git a/arch/avr32/include/uapi/asm/param.h b/arch/avr32/include/uapi/asm/param.h
new file mode 100644
index 000000000000..d28aa5ee6d37
--- /dev/null
+++ b/arch/avr32/include/uapi/asm/param.h
@@ -0,0 +1,18 @@
1#ifndef _UAPI__ASM_AVR32_PARAM_H
2#define _UAPI__ASM_AVR32_PARAM_H
3
4
5#ifndef HZ
6# define HZ 100
7#endif
8
9/* TODO: Should be configurable */
10#define EXEC_PAGESIZE 4096
11
12#ifndef NOGROUP
13# define NOGROUP (-1)
14#endif
15
16#define MAXHOSTNAMELEN 64
17
18#endif /* _UAPI__ASM_AVR32_PARAM_H */
diff --git a/arch/avr32/include/asm/poll.h b/arch/avr32/include/uapi/asm/poll.h
index c98509d3149e..c98509d3149e 100644
--- a/arch/avr32/include/asm/poll.h
+++ b/arch/avr32/include/uapi/asm/poll.h
diff --git a/arch/avr32/include/asm/posix_types.h b/arch/avr32/include/uapi/asm/posix_types.h
index 9ba9e749b3f3..9ba9e749b3f3 100644
--- a/arch/avr32/include/asm/posix_types.h
+++ b/arch/avr32/include/uapi/asm/posix_types.h
diff --git a/arch/avr32/include/uapi/asm/ptrace.h b/arch/avr32/include/uapi/asm/ptrace.h
new file mode 100644
index 000000000000..fe8c16275bc0
--- /dev/null
+++ b/arch/avr32/include/uapi/asm/ptrace.h
@@ -0,0 +1,126 @@
1/*
2 * Copyright (C) 2004-2006 Atmel Corporation
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8#ifndef _UAPI__ASM_AVR32_PTRACE_H
9#define _UAPI__ASM_AVR32_PTRACE_H
10
11#define PTRACE_GETREGS 12
12#define PTRACE_SETREGS 13
13
14/*
15 * Status Register bits
16 */
17#define SR_H 0x20000000
18#define SR_J 0x10000000
19#define SR_DM 0x08000000
20#define SR_D 0x04000000
21#define MODE_NMI 0x01c00000
22#define MODE_EXCEPTION 0x01800000
23#define MODE_INT3 0x01400000
24#define MODE_INT2 0x01000000
25#define MODE_INT1 0x00c00000
26#define MODE_INT0 0x00800000
27#define MODE_SUPERVISOR 0x00400000
28#define MODE_USER 0x00000000
29#define MODE_MASK 0x01c00000
30#define SR_EM 0x00200000
31#define SR_I3M 0x00100000
32#define SR_I2M 0x00080000
33#define SR_I1M 0x00040000
34#define SR_I0M 0x00020000
35#define SR_GM 0x00010000
36
37#define SR_H_BIT 29
38#define SR_J_BIT 28
39#define SR_DM_BIT 27
40#define SR_D_BIT 26
41#define MODE_SHIFT 22
42#define SR_EM_BIT 21
43#define SR_I3M_BIT 20
44#define SR_I2M_BIT 19
45#define SR_I1M_BIT 18
46#define SR_I0M_BIT 17
47#define SR_GM_BIT 16
48
49/* The user-visible part */
50#define SR_L 0x00000020
51#define SR_Q 0x00000010
52#define SR_V 0x00000008
53#define SR_N 0x00000004
54#define SR_Z 0x00000002
55#define SR_C 0x00000001
56
57#define SR_L_BIT 5
58#define SR_Q_BIT 4
59#define SR_V_BIT 3
60#define SR_N_BIT 2
61#define SR_Z_BIT 1
62#define SR_C_BIT 0
63
64/*
65 * The order is defined by the stmts instruction. r0 is stored first,
66 * so it gets the highest address.
67 *
68 * Registers 0-12 are general-purpose registers (r12 is normally used for
69 * the function return value).
70 * Register 13 is the stack pointer
71 * Register 14 is the link register
72 * Register 15 is the program counter (retrieved from the RAR sysreg)
73 */
74#define FRAME_SIZE_FULL 72
75#define REG_R12_ORIG 68
76#define REG_R0 64
77#define REG_R1 60
78#define REG_R2 56
79#define REG_R3 52
80#define REG_R4 48
81#define REG_R5 44
82#define REG_R6 40
83#define REG_R7 36
84#define REG_R8 32
85#define REG_R9 28
86#define REG_R10 24
87#define REG_R11 20
88#define REG_R12 16
89#define REG_SP 12
90#define REG_LR 8
91
92#define FRAME_SIZE_MIN 8
93#define REG_PC 4
94#define REG_SR 0
95
96#ifndef __ASSEMBLY__
97struct pt_regs {
98 /* These are always saved */
99 unsigned long sr;
100 unsigned long pc;
101
102 /* These are sometimes saved */
103 unsigned long lr;
104 unsigned long sp;
105 unsigned long r12;
106 unsigned long r11;
107 unsigned long r10;
108 unsigned long r9;
109 unsigned long r8;
110 unsigned long r7;
111 unsigned long r6;
112 unsigned long r5;
113 unsigned long r4;
114 unsigned long r3;
115 unsigned long r2;
116 unsigned long r1;
117 unsigned long r0;
118
119 /* Only saved on system call */
120 unsigned long r12_orig;
121};
122
123
124#endif /* ! __ASSEMBLY__ */
125
126#endif /* _UAPI__ASM_AVR32_PTRACE_H */
diff --git a/arch/avr32/include/asm/resource.h b/arch/avr32/include/uapi/asm/resource.h
index c6dd101472b1..c6dd101472b1 100644
--- a/arch/avr32/include/asm/resource.h
+++ b/arch/avr32/include/uapi/asm/resource.h
diff --git a/arch/avr32/include/asm/sembuf.h b/arch/avr32/include/uapi/asm/sembuf.h
index e472216e0c97..e472216e0c97 100644
--- a/arch/avr32/include/asm/sembuf.h
+++ b/arch/avr32/include/uapi/asm/sembuf.h
diff --git a/arch/avr32/include/uapi/asm/setup.h b/arch/avr32/include/uapi/asm/setup.h
new file mode 100644
index 000000000000..e58aa9356faf
--- /dev/null
+++ b/arch/avr32/include/uapi/asm/setup.h
@@ -0,0 +1,17 @@
1/*
2 * Copyright (C) 2004-2006 Atmel Corporation
3 *
4 * Based on linux/include/asm-arm/setup.h
5 * Copyright (C) 1997-1999 Russell King
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#ifndef _UAPI__ASM_AVR32_SETUP_H__
12#define _UAPI__ASM_AVR32_SETUP_H__
13
14#define COMMAND_LINE_SIZE 256
15
16
17#endif /* _UAPI__ASM_AVR32_SETUP_H__ */
diff --git a/arch/avr32/include/asm/shmbuf.h b/arch/avr32/include/uapi/asm/shmbuf.h
index c62fba41739a..c62fba41739a 100644
--- a/arch/avr32/include/asm/shmbuf.h
+++ b/arch/avr32/include/uapi/asm/shmbuf.h
diff --git a/arch/avr32/include/asm/sigcontext.h b/arch/avr32/include/uapi/asm/sigcontext.h
index e04062b5f39f..e04062b5f39f 100644
--- a/arch/avr32/include/asm/sigcontext.h
+++ b/arch/avr32/include/uapi/asm/sigcontext.h
diff --git a/arch/avr32/include/asm/siginfo.h b/arch/avr32/include/uapi/asm/siginfo.h
index 5ee93f40a8a8..5ee93f40a8a8 100644
--- a/arch/avr32/include/asm/siginfo.h
+++ b/arch/avr32/include/uapi/asm/siginfo.h
diff --git a/arch/avr32/include/uapi/asm/signal.h b/arch/avr32/include/uapi/asm/signal.h
new file mode 100644
index 000000000000..eb46f61adb7d
--- /dev/null
+++ b/arch/avr32/include/uapi/asm/signal.h
@@ -0,0 +1,128 @@
1/*
2 * Copyright (C) 2004-2006 Atmel Corporation
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8#ifndef _UAPI__ASM_AVR32_SIGNAL_H
9#define _UAPI__ASM_AVR32_SIGNAL_H
10
11#include <linux/types.h>
12
13/* Avoid too many header ordering problems. */
14struct siginfo;
15
16#ifndef __KERNEL__
17/* Here we must cater to libcs that poke about in kernel headers. */
18
19#define NSIG 32
20typedef unsigned long sigset_t;
21
22#endif /* __KERNEL__ */
23
24#define SIGHUP 1
25#define SIGINT 2
26#define SIGQUIT 3
27#define SIGILL 4
28#define SIGTRAP 5
29#define SIGABRT 6
30#define SIGIOT 6
31#define SIGBUS 7
32#define SIGFPE 8
33#define SIGKILL 9
34#define SIGUSR1 10
35#define SIGSEGV 11
36#define SIGUSR2 12
37#define SIGPIPE 13
38#define SIGALRM 14
39#define SIGTERM 15
40#define SIGSTKFLT 16
41#define SIGCHLD 17
42#define SIGCONT 18
43#define SIGSTOP 19
44#define SIGTSTP 20
45#define SIGTTIN 21
46#define SIGTTOU 22
47#define SIGURG 23
48#define SIGXCPU 24
49#define SIGXFSZ 25
50#define SIGVTALRM 26
51#define SIGPROF 27
52#define SIGWINCH 28
53#define SIGIO 29
54#define SIGPOLL SIGIO
55/*
56#define SIGLOST 29
57*/
58#define SIGPWR 30
59#define SIGSYS 31
60#define SIGUNUSED 31
61
62/* These should not be considered constants from userland. */
63#define SIGRTMIN 32
64#define SIGRTMAX (_NSIG-1)
65
66/*
67 * SA_FLAGS values:
68 *
69 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
70 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
71 * SA_SIGINFO deliver the signal with SIGINFO structs
72 * SA_ONSTACK indicates that a registered stack_t will be used.
73 * SA_RESTART flag to get restarting signals (which were the default long ago)
74 * SA_NODEFER prevents the current signal from being masked in the handler.
75 * SA_RESETHAND clears the handler when the signal is delivered.
76 *
77 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
78 * Unix names RESETHAND and NODEFER respectively.
79 */
80#define SA_NOCLDSTOP 0x00000001
81#define SA_NOCLDWAIT 0x00000002
82#define SA_SIGINFO 0x00000004
83#define SA_RESTORER 0x04000000
84#define SA_ONSTACK 0x08000000
85#define SA_RESTART 0x10000000
86#define SA_NODEFER 0x40000000
87#define SA_RESETHAND 0x80000000
88
89#define SA_NOMASK SA_NODEFER
90#define SA_ONESHOT SA_RESETHAND
91
92/*
93 * sigaltstack controls
94 */
95#define SS_ONSTACK 1
96#define SS_DISABLE 2
97
98#define MINSIGSTKSZ 2048
99#define SIGSTKSZ 8192
100
101#include <asm-generic/signal-defs.h>
102
103#ifndef __KERNEL__
104/* Here we must cater to libcs that poke about in kernel headers. */
105
106struct sigaction {
107 union {
108 __sighandler_t _sa_handler;
109 void (*_sa_sigaction)(int, struct siginfo *, void *);
110 } _u;
111 sigset_t sa_mask;
112 unsigned long sa_flags;
113 void (*sa_restorer)(void);
114};
115
116#define sa_handler _u._sa_handler
117#define sa_sigaction _u._sa_sigaction
118
119#endif /* __KERNEL__ */
120
121typedef struct sigaltstack {
122 void __user *ss_sp;
123 int ss_flags;
124 size_t ss_size;
125} stack_t;
126
127
128#endif /* _UAPI__ASM_AVR32_SIGNAL_H */
diff --git a/arch/avr32/include/asm/socket.h b/arch/avr32/include/uapi/asm/socket.h
index a473f8c6a9aa..a473f8c6a9aa 100644
--- a/arch/avr32/include/asm/socket.h
+++ b/arch/avr32/include/uapi/asm/socket.h
diff --git a/arch/avr32/include/asm/sockios.h b/arch/avr32/include/uapi/asm/sockios.h
index 0802d742f97d..0802d742f97d 100644
--- a/arch/avr32/include/asm/sockios.h
+++ b/arch/avr32/include/uapi/asm/sockios.h
diff --git a/arch/avr32/include/asm/stat.h b/arch/avr32/include/uapi/asm/stat.h
index e72881e10230..e72881e10230 100644
--- a/arch/avr32/include/asm/stat.h
+++ b/arch/avr32/include/uapi/asm/stat.h
diff --git a/arch/avr32/include/asm/statfs.h b/arch/avr32/include/uapi/asm/statfs.h
index 2961bd18c50e..2961bd18c50e 100644
--- a/arch/avr32/include/asm/statfs.h
+++ b/arch/avr32/include/uapi/asm/statfs.h
diff --git a/arch/avr32/include/asm/swab.h b/arch/avr32/include/uapi/asm/swab.h
index 14cc737bbca6..14cc737bbca6 100644
--- a/arch/avr32/include/asm/swab.h
+++ b/arch/avr32/include/uapi/asm/swab.h
diff --git a/arch/avr32/include/asm/termbits.h b/arch/avr32/include/uapi/asm/termbits.h
index 366adc5ebb10..366adc5ebb10 100644
--- a/arch/avr32/include/asm/termbits.h
+++ b/arch/avr32/include/uapi/asm/termbits.h
diff --git a/arch/avr32/include/uapi/asm/termios.h b/arch/avr32/include/uapi/asm/termios.h
new file mode 100644
index 000000000000..b8ef8ea63352
--- /dev/null
+++ b/arch/avr32/include/uapi/asm/termios.h
@@ -0,0 +1,50 @@
1/*
2 * Copyright (C) 2004-2006 Atmel Corporation
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8#ifndef _UAPI__ASM_AVR32_TERMIOS_H
9#define _UAPI__ASM_AVR32_TERMIOS_H
10
11#include <asm/termbits.h>
12#include <asm/ioctls.h>
13
14struct winsize {
15 unsigned short ws_row;
16 unsigned short ws_col;
17 unsigned short ws_xpixel;
18 unsigned short ws_ypixel;
19};
20
21#define NCC 8
22struct termio {
23 unsigned short c_iflag; /* input mode flags */
24 unsigned short c_oflag; /* output mode flags */
25 unsigned short c_cflag; /* control mode flags */
26 unsigned short c_lflag; /* local mode flags */
27 unsigned char c_line; /* line discipline */
28 unsigned char c_cc[NCC]; /* control characters */
29};
30
31/* modem lines */
32#define TIOCM_LE 0x001
33#define TIOCM_DTR 0x002
34#define TIOCM_RTS 0x004
35#define TIOCM_ST 0x008
36#define TIOCM_SR 0x010
37#define TIOCM_CTS 0x020
38#define TIOCM_CAR 0x040
39#define TIOCM_RNG 0x080
40#define TIOCM_DSR 0x100
41#define TIOCM_CD TIOCM_CAR
42#define TIOCM_RI TIOCM_RNG
43#define TIOCM_OUT1 0x2000
44#define TIOCM_OUT2 0x4000
45#define TIOCM_LOOP 0x8000
46
47/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
48
49
50#endif /* _UAPI__ASM_AVR32_TERMIOS_H */
diff --git a/arch/avr32/include/uapi/asm/types.h b/arch/avr32/include/uapi/asm/types.h
new file mode 100644
index 000000000000..bb34ad349dfc
--- /dev/null
+++ b/arch/avr32/include/uapi/asm/types.h
@@ -0,0 +1,8 @@
1/*
2 * Copyright (C) 2004-2006 Atmel Corporation
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8#include <asm-generic/int-ll64.h>
diff --git a/arch/avr32/include/uapi/asm/unistd.h b/arch/avr32/include/uapi/asm/unistd.h
new file mode 100644
index 000000000000..3eaa68753adb
--- /dev/null
+++ b/arch/avr32/include/uapi/asm/unistd.h
@@ -0,0 +1,305 @@
1/*
2 * Copyright (C) 2004-2006 Atmel Corporation
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8#ifndef _UAPI__ASM_AVR32_UNISTD_H
9#define _UAPI__ASM_AVR32_UNISTD_H
10
11/*
12 * This file contains the system call numbers.
13 */
14
15#define __NR_restart_syscall 0
16#define __NR_exit 1
17#define __NR_fork 2
18#define __NR_read 3
19#define __NR_write 4
20#define __NR_open 5
21#define __NR_close 6
22#define __NR_umask 7
23#define __NR_creat 8
24#define __NR_link 9
25#define __NR_unlink 10
26#define __NR_execve 11
27#define __NR_chdir 12
28#define __NR_time 13
29#define __NR_mknod 14
30#define __NR_chmod 15
31#define __NR_chown 16
32#define __NR_lchown 17
33#define __NR_lseek 18
34#define __NR__llseek 19
35#define __NR_getpid 20
36#define __NR_mount 21
37#define __NR_umount2 22
38#define __NR_setuid 23
39#define __NR_getuid 24
40#define __NR_stime 25
41#define __NR_ptrace 26
42#define __NR_alarm 27
43#define __NR_pause 28
44#define __NR_utime 29
45#define __NR_stat 30
46#define __NR_fstat 31
47#define __NR_lstat 32
48#define __NR_access 33
49#define __NR_chroot 34
50#define __NR_sync 35
51#define __NR_fsync 36
52#define __NR_kill 37
53#define __NR_rename 38
54#define __NR_mkdir 39
55#define __NR_rmdir 40
56#define __NR_dup 41
57#define __NR_pipe 42
58#define __NR_times 43
59#define __NR_clone 44
60#define __NR_brk 45
61#define __NR_setgid 46
62#define __NR_getgid 47
63#define __NR_getcwd 48
64#define __NR_geteuid 49
65#define __NR_getegid 50
66#define __NR_acct 51
67#define __NR_setfsuid 52
68#define __NR_setfsgid 53
69#define __NR_ioctl 54
70#define __NR_fcntl 55
71#define __NR_setpgid 56
72#define __NR_mremap 57
73#define __NR_setresuid 58
74#define __NR_getresuid 59
75#define __NR_setreuid 60
76#define __NR_setregid 61
77#define __NR_ustat 62
78#define __NR_dup2 63
79#define __NR_getppid 64
80#define __NR_getpgrp 65
81#define __NR_setsid 66
82#define __NR_rt_sigaction 67
83#define __NR_rt_sigreturn 68
84#define __NR_rt_sigprocmask 69
85#define __NR_rt_sigpending 70
86#define __NR_rt_sigtimedwait 71
87#define __NR_rt_sigqueueinfo 72
88#define __NR_rt_sigsuspend 73
89#define __NR_sethostname 74
90#define __NR_setrlimit 75
91#define __NR_getrlimit 76 /* SuS compliant getrlimit */
92#define __NR_getrusage 77
93#define __NR_gettimeofday 78
94#define __NR_settimeofday 79
95#define __NR_getgroups 80
96#define __NR_setgroups 81
97#define __NR_select 82
98#define __NR_symlink 83
99#define __NR_fchdir 84
100#define __NR_readlink 85
101#define __NR_pread 86
102#define __NR_pwrite 87
103#define __NR_swapon 88
104#define __NR_reboot 89
105#define __NR_mmap2 90
106#define __NR_munmap 91
107#define __NR_truncate 92
108#define __NR_ftruncate 93
109#define __NR_fchmod 94
110#define __NR_fchown 95
111#define __NR_getpriority 96
112#define __NR_setpriority 97
113#define __NR_wait4 98
114#define __NR_statfs 99
115#define __NR_fstatfs 100
116#define __NR_vhangup 101
117#define __NR_sigaltstack 102
118#define __NR_syslog 103
119#define __NR_setitimer 104
120#define __NR_getitimer 105
121#define __NR_swapoff 106
122#define __NR_sysinfo 107
123/* 108 was __NR_ipc for a little while */
124#define __NR_sendfile 109
125#define __NR_setdomainname 110
126#define __NR_uname 111
127#define __NR_adjtimex 112
128#define __NR_mprotect 113
129#define __NR_vfork 114
130#define __NR_init_module 115
131#define __NR_delete_module 116
132#define __NR_quotactl 117
133#define __NR_getpgid 118
134#define __NR_bdflush 119
135#define __NR_sysfs 120
136#define __NR_personality 121
137#define __NR_afs_syscall 122 /* Syscall for Andrew File System */
138#define __NR_getdents 123
139#define __NR_flock 124
140#define __NR_msync 125
141#define __NR_readv 126
142#define __NR_writev 127
143#define __NR_getsid 128
144#define __NR_fdatasync 129
145#define __NR__sysctl 130
146#define __NR_mlock 131
147#define __NR_munlock 132
148#define __NR_mlockall 133
149#define __NR_munlockall 134
150#define __NR_sched_setparam 135
151#define __NR_sched_getparam 136
152#define __NR_sched_setscheduler 137
153#define __NR_sched_getscheduler 138
154#define __NR_sched_yield 139
155#define __NR_sched_get_priority_max 140
156#define __NR_sched_get_priority_min 141
157#define __NR_sched_rr_get_interval 142
158#define __NR_nanosleep 143
159#define __NR_poll 144
160#define __NR_nfsservctl 145
161#define __NR_setresgid 146
162#define __NR_getresgid 147
163#define __NR_prctl 148
164#define __NR_socket 149
165#define __NR_bind 150
166#define __NR_connect 151
167#define __NR_listen 152
168#define __NR_accept 153
169#define __NR_getsockname 154
170#define __NR_getpeername 155
171#define __NR_socketpair 156
172#define __NR_send 157
173#define __NR_recv 158
174#define __NR_sendto 159
175#define __NR_recvfrom 160
176#define __NR_shutdown 161
177#define __NR_setsockopt 162
178#define __NR_getsockopt 163
179#define __NR_sendmsg 164
180#define __NR_recvmsg 165
181#define __NR_truncate64 166
182#define __NR_ftruncate64 167
183#define __NR_stat64 168
184#define __NR_lstat64 169
185#define __NR_fstat64 170
186#define __NR_pivot_root 171
187#define __NR_mincore 172
188#define __NR_madvise 173
189#define __NR_getdents64 174
190#define __NR_fcntl64 175
191#define __NR_gettid 176
192#define __NR_readahead 177
193#define __NR_setxattr 178
194#define __NR_lsetxattr 179
195#define __NR_fsetxattr 180
196#define __NR_getxattr 181
197#define __NR_lgetxattr 182
198#define __NR_fgetxattr 183
199#define __NR_listxattr 184
200#define __NR_llistxattr 185
201#define __NR_flistxattr 186
202#define __NR_removexattr 187
203#define __NR_lremovexattr 188
204#define __NR_fremovexattr 189
205#define __NR_tkill 190
206#define __NR_sendfile64 191
207#define __NR_futex 192
208#define __NR_sched_setaffinity 193
209#define __NR_sched_getaffinity 194
210#define __NR_capget 195
211#define __NR_capset 196
212#define __NR_io_setup 197
213#define __NR_io_destroy 198
214#define __NR_io_getevents 199
215#define __NR_io_submit 200
216#define __NR_io_cancel 201
217#define __NR_fadvise64 202
218#define __NR_exit_group 203
219#define __NR_lookup_dcookie 204
220#define __NR_epoll_create 205
221#define __NR_epoll_ctl 206
222#define __NR_epoll_wait 207
223#define __NR_remap_file_pages 208
224#define __NR_set_tid_address 209
225
226#define __NR_timer_create 210
227#define __NR_timer_settime 211
228#define __NR_timer_gettime 212
229#define __NR_timer_getoverrun 213
230#define __NR_timer_delete 214
231#define __NR_clock_settime 215
232#define __NR_clock_gettime 216
233#define __NR_clock_getres 217
234#define __NR_clock_nanosleep 218
235#define __NR_statfs64 219
236#define __NR_fstatfs64 220
237#define __NR_tgkill 221
238 /* 222 reserved for tux */
239#define __NR_utimes 223
240#define __NR_fadvise64_64 224
241
242#define __NR_cacheflush 225
243
244#define __NR_vserver 226
245#define __NR_mq_open 227
246#define __NR_mq_unlink 228
247#define __NR_mq_timedsend 229
248#define __NR_mq_timedreceive 230
249#define __NR_mq_notify 231
250#define __NR_mq_getsetattr 232
251#define __NR_kexec_load 233
252#define __NR_waitid 234
253#define __NR_add_key 235
254#define __NR_request_key 236
255#define __NR_keyctl 237
256#define __NR_ioprio_set 238
257#define __NR_ioprio_get 239
258#define __NR_inotify_init 240
259#define __NR_inotify_add_watch 241
260#define __NR_inotify_rm_watch 242
261#define __NR_openat 243
262#define __NR_mkdirat 244
263#define __NR_mknodat 245
264#define __NR_fchownat 246
265#define __NR_futimesat 247
266#define __NR_fstatat64 248
267#define __NR_unlinkat 249
268#define __NR_renameat 250
269#define __NR_linkat 251
270#define __NR_symlinkat 252
271#define __NR_readlinkat 253
272#define __NR_fchmodat 254
273#define __NR_faccessat 255
274#define __NR_pselect6 256
275#define __NR_ppoll 257
276#define __NR_unshare 258
277#define __NR_set_robust_list 259
278#define __NR_get_robust_list 260
279#define __NR_splice 261
280#define __NR_sync_file_range 262
281#define __NR_tee 263
282#define __NR_vmsplice 264
283#define __NR_epoll_pwait 265
284
285#define __NR_msgget 266
286#define __NR_msgsnd 267
287#define __NR_msgrcv 268
288#define __NR_msgctl 269
289#define __NR_semget 270
290#define __NR_semop 271
291#define __NR_semctl 272
292#define __NR_semtimedop 273
293#define __NR_shmat 274
294#define __NR_shmget 275
295#define __NR_shmdt 276
296#define __NR_shmctl 277
297
298#define __NR_utimensat 278
299#define __NR_signalfd 279
300/* 280 was __NR_timerfd */
301#define __NR_eventfd 281
302#define __NR_setns 283
303
304
305#endif /* _UAPI__ASM_AVR32_UNISTD_H */