diff options
Diffstat (limited to 'arch/mips/include/asm')
-rw-r--r-- | arch/mips/include/asm/compat-signal.h | 62 | ||||
-rw-r--r-- | arch/mips/include/asm/compat.h | 69 |
2 files changed, 68 insertions, 63 deletions
diff --git a/arch/mips/include/asm/compat-signal.h b/arch/mips/include/asm/compat-signal.h index 368a99e5c3e1..6599a901b63e 100644 --- a/arch/mips/include/asm/compat-signal.h +++ b/arch/mips/include/asm/compat-signal.h | |||
@@ -10,68 +10,6 @@ | |||
10 | 10 | ||
11 | #include <asm/uaccess.h> | 11 | #include <asm/uaccess.h> |
12 | 12 | ||
13 | #define SI_PAD_SIZE32 ((SI_MAX_SIZE/sizeof(int)) - 3) | ||
14 | |||
15 | typedef struct compat_siginfo { | ||
16 | int si_signo; | ||
17 | int si_code; | ||
18 | int si_errno; | ||
19 | |||
20 | union { | ||
21 | int _pad[SI_PAD_SIZE32]; | ||
22 | |||
23 | /* kill() */ | ||
24 | struct { | ||
25 | compat_pid_t _pid; /* sender's pid */ | ||
26 | compat_uid_t _uid; /* sender's uid */ | ||
27 | } _kill; | ||
28 | |||
29 | /* SIGCHLD */ | ||
30 | struct { | ||
31 | compat_pid_t _pid; /* which child */ | ||
32 | compat_uid_t _uid; /* sender's uid */ | ||
33 | int _status; /* exit code */ | ||
34 | compat_clock_t _utime; | ||
35 | compat_clock_t _stime; | ||
36 | } _sigchld; | ||
37 | |||
38 | /* IRIX SIGCHLD */ | ||
39 | struct { | ||
40 | compat_pid_t _pid; /* which child */ | ||
41 | compat_clock_t _utime; | ||
42 | int _status; /* exit code */ | ||
43 | compat_clock_t _stime; | ||
44 | } _irix_sigchld; | ||
45 | |||
46 | /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ | ||
47 | struct { | ||
48 | s32 _addr; /* faulting insn/memory ref. */ | ||
49 | } _sigfault; | ||
50 | |||
51 | /* SIGPOLL, SIGXFSZ (To do ...) */ | ||
52 | struct { | ||
53 | int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ | ||
54 | int _fd; | ||
55 | } _sigpoll; | ||
56 | |||
57 | /* POSIX.1b timers */ | ||
58 | struct { | ||
59 | timer_t _tid; /* timer id */ | ||
60 | int _overrun; /* overrun count */ | ||
61 | compat_sigval_t _sigval;/* same as below */ | ||
62 | int _sys_private; /* not to be passed to user */ | ||
63 | } _timer; | ||
64 | |||
65 | /* POSIX.1b signals */ | ||
66 | struct { | ||
67 | compat_pid_t _pid; /* sender's pid */ | ||
68 | compat_uid_t _uid; /* sender's uid */ | ||
69 | compat_sigval_t _sigval; | ||
70 | } _rt; | ||
71 | |||
72 | } _sifields; | ||
73 | } compat_siginfo_t; | ||
74 | |||
75 | static inline int __copy_conv_sigset_to_user(compat_sigset_t __user *d, | 13 | static inline int __copy_conv_sigset_to_user(compat_sigset_t __user *d, |
76 | const sigset_t *s) | 14 | const sigset_t *s) |
77 | { | 15 | { |
diff --git a/arch/mips/include/asm/compat.h b/arch/mips/include/asm/compat.h index b77df0366ee6..58277e0e9cd4 100644 --- a/arch/mips/include/asm/compat.h +++ b/arch/mips/include/asm/compat.h | |||
@@ -43,6 +43,7 @@ typedef s64 compat_s64; | |||
43 | typedef u32 compat_uint_t; | 43 | typedef u32 compat_uint_t; |
44 | typedef u32 compat_ulong_t; | 44 | typedef u32 compat_ulong_t; |
45 | typedef u64 compat_u64; | 45 | typedef u64 compat_u64; |
46 | typedef u32 compat_uptr_t; | ||
46 | 47 | ||
47 | struct compat_timespec { | 48 | struct compat_timespec { |
48 | compat_time_t tv_sec; | 49 | compat_time_t tv_sec; |
@@ -124,6 +125,73 @@ typedef u32 compat_old_sigset_t; /* at least 32 bits */ | |||
124 | 125 | ||
125 | typedef u32 compat_sigset_word; | 126 | typedef u32 compat_sigset_word; |
126 | 127 | ||
128 | typedef union compat_sigval { | ||
129 | compat_int_t sival_int; | ||
130 | compat_uptr_t sival_ptr; | ||
131 | } compat_sigval_t; | ||
132 | |||
133 | #define SI_PAD_SIZE32 (128/sizeof(int) - 3) | ||
134 | |||
135 | typedef struct compat_siginfo { | ||
136 | int si_signo; | ||
137 | int si_code; | ||
138 | int si_errno; | ||
139 | |||
140 | union { | ||
141 | int _pad[SI_PAD_SIZE32]; | ||
142 | |||
143 | /* kill() */ | ||
144 | struct { | ||
145 | compat_pid_t _pid; /* sender's pid */ | ||
146 | __compat_uid_t _uid; /* sender's uid */ | ||
147 | } _kill; | ||
148 | |||
149 | /* SIGCHLD */ | ||
150 | struct { | ||
151 | compat_pid_t _pid; /* which child */ | ||
152 | __compat_uid_t _uid; /* sender's uid */ | ||
153 | int _status; /* exit code */ | ||
154 | compat_clock_t _utime; | ||
155 | compat_clock_t _stime; | ||
156 | } _sigchld; | ||
157 | |||
158 | /* IRIX SIGCHLD */ | ||
159 | struct { | ||
160 | compat_pid_t _pid; /* which child */ | ||
161 | compat_clock_t _utime; | ||
162 | int _status; /* exit code */ | ||
163 | compat_clock_t _stime; | ||
164 | } _irix_sigchld; | ||
165 | |||
166 | /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ | ||
167 | struct { | ||
168 | s32 _addr; /* faulting insn/memory ref. */ | ||
169 | } _sigfault; | ||
170 | |||
171 | /* SIGPOLL, SIGXFSZ (To do ...) */ | ||
172 | struct { | ||
173 | int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ | ||
174 | int _fd; | ||
175 | } _sigpoll; | ||
176 | |||
177 | /* POSIX.1b timers */ | ||
178 | struct { | ||
179 | timer_t _tid; /* timer id */ | ||
180 | int _overrun; /* overrun count */ | ||
181 | compat_sigval_t _sigval;/* same as below */ | ||
182 | int _sys_private; /* not to be passed to user */ | ||
183 | } _timer; | ||
184 | |||
185 | /* POSIX.1b signals */ | ||
186 | struct { | ||
187 | compat_pid_t _pid; /* sender's pid */ | ||
188 | __compat_uid_t _uid; /* sender's uid */ | ||
189 | compat_sigval_t _sigval; | ||
190 | } _rt; | ||
191 | |||
192 | } _sifields; | ||
193 | } compat_siginfo_t; | ||
194 | |||
127 | #define COMPAT_OFF_T_MAX 0x7fffffff | 195 | #define COMPAT_OFF_T_MAX 0x7fffffff |
128 | #define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL | 196 | #define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL |
129 | 197 | ||
@@ -133,7 +201,6 @@ typedef u32 compat_sigset_word; | |||
133 | * as pointers because the syscall entry code will have | 201 | * as pointers because the syscall entry code will have |
134 | * appropriately converted them already. | 202 | * appropriately converted them already. |
135 | */ | 203 | */ |
136 | typedef u32 compat_uptr_t; | ||
137 | 204 | ||
138 | static inline void __user *compat_ptr(compat_uptr_t uptr) | 205 | static inline void __user *compat_ptr(compat_uptr_t uptr) |
139 | { | 206 | { |