aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2014-02-28 07:22:47 -0500
committerHeiko Carstens <heiko.carstens@de.ibm.com>2014-03-04 03:05:44 -0500
commit9c4d62fab4d29655a5ab198f3756693481a6b2da (patch)
tree6aea5b6188b799b8125ea699d46df244fabcde09 /arch
parent18421166e8360bbb29b5eedd2cd3a9aedc0c90b3 (diff)
s390/compat: convert system call wrappers to C part 11
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/include/asm/compat.h1
-rw-r--r--arch/s390/kernel/compat_wrap.c10
-rw-r--r--arch/s390/kernel/compat_wrapper.S48
-rw-r--r--arch/s390/kernel/syscalls.S20
4 files changed, 21 insertions, 58 deletions
diff --git a/arch/s390/include/asm/compat.h b/arch/s390/include/asm/compat.h
index 5d7e8cf83bd6..1174ea2b5e7c 100644
--- a/arch/s390/include/asm/compat.h
+++ b/arch/s390/include/asm/compat.h
@@ -65,6 +65,7 @@ typedef u32 compat_caddr_t;
65typedef __kernel_fsid_t compat_fsid_t; 65typedef __kernel_fsid_t compat_fsid_t;
66typedef s32 compat_key_t; 66typedef s32 compat_key_t;
67typedef s32 compat_timer_t; 67typedef s32 compat_timer_t;
68typedef u32 compat_aio_context_t;
68 69
69typedef s32 compat_int_t; 70typedef s32 compat_int_t;
70typedef s32 compat_long_t; 71typedef s32 compat_long_t;
diff --git a/arch/s390/kernel/compat_wrap.c b/arch/s390/kernel/compat_wrap.c
index 97197b8ab838..76d714e11370 100644
--- a/arch/s390/kernel/compat_wrap.c
+++ b/arch/s390/kernel/compat_wrap.c
@@ -124,3 +124,13 @@ COMPAT_SYSCALL_WRAP3(flistxattr, int, fd, char __user *, list, compat_size_t, si
124COMPAT_SYSCALL_WRAP2(removexattr, const char __user *, path, const char __user *, name); 124COMPAT_SYSCALL_WRAP2(removexattr, const char __user *, path, const char __user *, name);
125COMPAT_SYSCALL_WRAP2(lremovexattr, const char __user *, path, const char __user *, name); 125COMPAT_SYSCALL_WRAP2(lremovexattr, const char __user *, path, const char __user *, name);
126COMPAT_SYSCALL_WRAP2(fremovexattr, int, fd, const char __user *, name); 126COMPAT_SYSCALL_WRAP2(fremovexattr, int, fd, const char __user *, name);
127COMPAT_SYSCALL_WRAP1(exit_group, int, error_code);
128COMPAT_SYSCALL_WRAP1(set_tid_address, int __user *, tidptr);
129COMPAT_SYSCALL_WRAP1(epoll_create, int, size);
130COMPAT_SYSCALL_WRAP4(epoll_ctl, int, epfd, int, op, int, fd, struct epoll_event __user *, event);
131COMPAT_SYSCALL_WRAP4(epoll_wait, int, epfd, struct epoll_event __user *, events, int, maxevents, int, timeout);
132COMPAT_SYSCALL_WRAP1(timer_getoverrun, timer_t, timer_id);
133COMPAT_SYSCALL_WRAP1(timer_delete, compat_timer_t, compat_timer_id);
134COMPAT_SYSCALL_WRAP1(io_destroy, compat_aio_context_t, ctx);
135COMPAT_SYSCALL_WRAP3(io_cancel, compat_aio_context_t, ctx_id, struct iocb __user *, iocb, struct io_event __user *, result);
136COMPAT_SYSCALL_WRAP1(mq_unlink, const char __user *, name);
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
index f23a462947a6..9ada8fbcb8cc 100644
--- a/arch/s390/kernel/compat_wrapper.S
+++ b/arch/s390/kernel/compat_wrapper.S
@@ -181,32 +181,6 @@ ENTRY(sys32_sched_getaffinity_wrapper)
181 llgtr %r4,%r4 # unsigned long * 181 llgtr %r4,%r4 # unsigned long *
182 jg compat_sys_sched_getaffinity 182 jg compat_sys_sched_getaffinity
183 183
184ENTRY(sys32_exit_group_wrapper)
185 lgfr %r2,%r2 # int
186 jg sys_exit_group # branch to system call
187
188ENTRY(sys32_set_tid_address_wrapper)
189 llgtr %r2,%r2 # int *
190 jg sys_set_tid_address # branch to system call
191
192ENTRY(sys_epoll_create_wrapper)
193 lgfr %r2,%r2 # int
194 jg sys_epoll_create # branch to system call
195
196ENTRY(sys_epoll_ctl_wrapper)
197 lgfr %r2,%r2 # int
198 lgfr %r3,%r3 # int
199 lgfr %r4,%r4 # int
200 llgtr %r5,%r5 # struct epoll_event *
201 jg sys_epoll_ctl # branch to system call
202
203ENTRY(sys_epoll_wait_wrapper)
204 lgfr %r2,%r2 # int
205 llgtr %r3,%r3 # struct epoll_event *
206 lgfr %r4,%r4 # int
207 lgfr %r5,%r5 # int
208 jg sys_epoll_wait # branch to system call
209
210ENTRY(sys32_clock_settime_wrapper) 184ENTRY(sys32_clock_settime_wrapper)
211 lgfr %r2,%r2 # clockid_t (int) 185 lgfr %r2,%r2 # clockid_t (int)
212 llgtr %r3,%r3 # struct compat_timespec * 186 llgtr %r3,%r3 # struct compat_timespec *
@@ -247,23 +221,11 @@ ENTRY(sys32_timer_gettime_wrapper)
247 llgtr %r3,%r3 # struct compat_itimerspec * 221 llgtr %r3,%r3 # struct compat_itimerspec *
248 jg compat_sys_timer_gettime 222 jg compat_sys_timer_gettime
249 223
250ENTRY(sys32_timer_getoverrun_wrapper)
251 lgfr %r2,%r2 # timer_t (int)
252 jg sys_timer_getoverrun
253
254ENTRY(sys32_timer_delete_wrapper)
255 lgfr %r2,%r2 # timer_t (int)
256 jg sys_timer_delete
257
258ENTRY(sys32_io_setup_wrapper) 224ENTRY(sys32_io_setup_wrapper)
259 llgfr %r2,%r2 # unsigned int 225 llgfr %r2,%r2 # unsigned int
260 llgtr %r3,%r3 # u32 * 226 llgtr %r3,%r3 # u32 *
261 jg compat_sys_io_setup 227 jg compat_sys_io_setup
262 228
263ENTRY(sys32_io_destroy_wrapper)
264 llgfr %r2,%r2 # (aio_context_t) u32
265 jg sys_io_destroy
266
267ENTRY(sys32_io_getevents_wrapper) 229ENTRY(sys32_io_getevents_wrapper)
268 llgfr %r2,%r2 # (aio_context_t) u32 230 llgfr %r2,%r2 # (aio_context_t) u32
269 lgfr %r3,%r3 # long 231 lgfr %r3,%r3 # long
@@ -278,12 +240,6 @@ ENTRY(sys32_io_submit_wrapper)
278 llgtr %r4,%r4 # struct iocb ** 240 llgtr %r4,%r4 # struct iocb **
279 jg compat_sys_io_submit 241 jg compat_sys_io_submit
280 242
281ENTRY(sys32_io_cancel_wrapper)
282 llgfr %r2,%r2 # (aio_context_t) u32
283 llgtr %r3,%r3 # struct iocb *
284 llgtr %r4,%r4 # struct io_event *
285 jg sys_io_cancel
286
287ENTRY(compat_sys_statfs64_wrapper) 243ENTRY(compat_sys_statfs64_wrapper)
288 llgtr %r2,%r2 # const char * 244 llgtr %r2,%r2 # const char *
289 llgfr %r3,%r3 # compat_size_t 245 llgfr %r3,%r3 # compat_size_t
@@ -303,10 +259,6 @@ ENTRY(compat_sys_mq_open_wrapper)
303 llgtr %r5,%r5 # struct compat_mq_attr * 259 llgtr %r5,%r5 # struct compat_mq_attr *
304 jg compat_sys_mq_open 260 jg compat_sys_mq_open
305 261
306ENTRY(sys32_mq_unlink_wrapper)
307 llgtr %r2,%r2 # const char *
308 jg sys_mq_unlink
309
310ENTRY(compat_sys_mq_timedsend_wrapper) 262ENTRY(compat_sys_mq_timedsend_wrapper)
311 lgfr %r2,%r2 # mqd_t 263 lgfr %r2,%r2 # mqd_t
312 llgtr %r3,%r3 # const char * 264 llgtr %r3,%r3 # const char *
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
index cb6fc8abb707..927da9cb4d35 100644
--- a/arch/s390/kernel/syscalls.S
+++ b/arch/s390/kernel/syscalls.S
@@ -252,21 +252,21 @@ SYSCALL(sys_sched_getaffinity,sys_sched_getaffinity,sys32_sched_getaffinity_wrap
252SYSCALL(sys_tgkill,sys_tgkill,sys_tgkill_wrapper) 252SYSCALL(sys_tgkill,sys_tgkill,sys_tgkill_wrapper)
253NI_SYSCALL /* reserved for TUX */ 253NI_SYSCALL /* reserved for TUX */
254SYSCALL(sys_io_setup,sys_io_setup,sys32_io_setup_wrapper) 254SYSCALL(sys_io_setup,sys_io_setup,sys32_io_setup_wrapper)
255SYSCALL(sys_io_destroy,sys_io_destroy,sys32_io_destroy_wrapper) 255SYSCALL(sys_io_destroy,sys_io_destroy,compat_sys_io_destroy)
256SYSCALL(sys_io_getevents,sys_io_getevents,sys32_io_getevents_wrapper) /* 245 */ 256SYSCALL(sys_io_getevents,sys_io_getevents,sys32_io_getevents_wrapper) /* 245 */
257SYSCALL(sys_io_submit,sys_io_submit,sys32_io_submit_wrapper) 257SYSCALL(sys_io_submit,sys_io_submit,sys32_io_submit_wrapper)
258SYSCALL(sys_io_cancel,sys_io_cancel,sys32_io_cancel_wrapper) 258SYSCALL(sys_io_cancel,sys_io_cancel,compat_sys_io_cancel)
259SYSCALL(sys_exit_group,sys_exit_group,sys32_exit_group_wrapper) 259SYSCALL(sys_exit_group,sys_exit_group,compat_sys_exit_group)
260SYSCALL(sys_epoll_create,sys_epoll_create,sys_epoll_create_wrapper) 260SYSCALL(sys_epoll_create,sys_epoll_create,compat_sys_epoll_create)
261SYSCALL(sys_epoll_ctl,sys_epoll_ctl,sys_epoll_ctl_wrapper) /* 250 */ 261SYSCALL(sys_epoll_ctl,sys_epoll_ctl,compat_sys_epoll_ctl) /* 250 */
262SYSCALL(sys_epoll_wait,sys_epoll_wait,sys_epoll_wait_wrapper) 262SYSCALL(sys_epoll_wait,sys_epoll_wait,compat_sys_epoll_wait)
263SYSCALL(sys_set_tid_address,sys_set_tid_address,sys32_set_tid_address_wrapper) 263SYSCALL(sys_set_tid_address,sys_set_tid_address,compat_sys_set_tid_address)
264SYSCALL(sys_s390_fadvise64,sys_fadvise64_64,compat_sys_s390_fadvise64) 264SYSCALL(sys_s390_fadvise64,sys_fadvise64_64,compat_sys_s390_fadvise64)
265SYSCALL(sys_timer_create,sys_timer_create,sys32_timer_create_wrapper) 265SYSCALL(sys_timer_create,sys_timer_create,sys32_timer_create_wrapper)
266SYSCALL(sys_timer_settime,sys_timer_settime,sys32_timer_settime_wrapper) /* 255 */ 266SYSCALL(sys_timer_settime,sys_timer_settime,sys32_timer_settime_wrapper) /* 255 */
267SYSCALL(sys_timer_gettime,sys_timer_gettime,sys32_timer_gettime_wrapper) 267SYSCALL(sys_timer_gettime,sys_timer_gettime,sys32_timer_gettime_wrapper)
268SYSCALL(sys_timer_getoverrun,sys_timer_getoverrun,sys32_timer_getoverrun_wrapper) 268SYSCALL(sys_timer_getoverrun,sys_timer_getoverrun,compat_sys_timer_getoverrun)
269SYSCALL(sys_timer_delete,sys_timer_delete,sys32_timer_delete_wrapper) 269SYSCALL(sys_timer_delete,sys_timer_delete,compat_sys_timer_delete)
270SYSCALL(sys_clock_settime,sys_clock_settime,sys32_clock_settime_wrapper) 270SYSCALL(sys_clock_settime,sys_clock_settime,sys32_clock_settime_wrapper)
271SYSCALL(sys_clock_gettime,sys_clock_gettime,sys32_clock_gettime_wrapper) /* 260 */ 271SYSCALL(sys_clock_gettime,sys_clock_gettime,sys32_clock_gettime_wrapper) /* 260 */
272SYSCALL(sys_clock_getres,sys_clock_getres,sys32_clock_getres_wrapper) 272SYSCALL(sys_clock_getres,sys_clock_getres,sys32_clock_getres_wrapper)
@@ -280,7 +280,7 @@ NI_SYSCALL /* 268 sys_mbind */
280NI_SYSCALL /* 269 sys_get_mempolicy */ 280NI_SYSCALL /* 269 sys_get_mempolicy */
281NI_SYSCALL /* 270 sys_set_mempolicy */ 281NI_SYSCALL /* 270 sys_set_mempolicy */
282SYSCALL(sys_mq_open,sys_mq_open,compat_sys_mq_open_wrapper) 282SYSCALL(sys_mq_open,sys_mq_open,compat_sys_mq_open_wrapper)
283SYSCALL(sys_mq_unlink,sys_mq_unlink,sys32_mq_unlink_wrapper) 283SYSCALL(sys_mq_unlink,sys_mq_unlink,compat_sys_mq_unlink)
284SYSCALL(sys_mq_timedsend,sys_mq_timedsend,compat_sys_mq_timedsend_wrapper) 284SYSCALL(sys_mq_timedsend,sys_mq_timedsend,compat_sys_mq_timedsend_wrapper)
285SYSCALL(sys_mq_timedreceive,sys_mq_timedreceive,compat_sys_mq_timedreceive_wrapper) 285SYSCALL(sys_mq_timedreceive,sys_mq_timedreceive,compat_sys_mq_timedreceive_wrapper)
286SYSCALL(sys_mq_notify,sys_mq_notify,compat_sys_mq_notify_wrapper) /* 275 */ 286SYSCALL(sys_mq_notify,sys_mq_notify,compat_sys_mq_notify_wrapper) /* 275 */