diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2014-02-28 07:22:47 -0500 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2014-03-04 03:05:44 -0500 |
commit | 9c4d62fab4d29655a5ab198f3756693481a6b2da (patch) | |
tree | 6aea5b6188b799b8125ea699d46df244fabcde09 /arch | |
parent | 18421166e8360bbb29b5eedd2cd3a9aedc0c90b3 (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.h | 1 | ||||
-rw-r--r-- | arch/s390/kernel/compat_wrap.c | 10 | ||||
-rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 48 | ||||
-rw-r--r-- | arch/s390/kernel/syscalls.S | 20 |
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; | |||
65 | typedef __kernel_fsid_t compat_fsid_t; | 65 | typedef __kernel_fsid_t compat_fsid_t; |
66 | typedef s32 compat_key_t; | 66 | typedef s32 compat_key_t; |
67 | typedef s32 compat_timer_t; | 67 | typedef s32 compat_timer_t; |
68 | typedef u32 compat_aio_context_t; | ||
68 | 69 | ||
69 | typedef s32 compat_int_t; | 70 | typedef s32 compat_int_t; |
70 | typedef s32 compat_long_t; | 71 | typedef 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 | |||
124 | COMPAT_SYSCALL_WRAP2(removexattr, const char __user *, path, const char __user *, name); | 124 | COMPAT_SYSCALL_WRAP2(removexattr, const char __user *, path, const char __user *, name); |
125 | COMPAT_SYSCALL_WRAP2(lremovexattr, const char __user *, path, const char __user *, name); | 125 | COMPAT_SYSCALL_WRAP2(lremovexattr, const char __user *, path, const char __user *, name); |
126 | COMPAT_SYSCALL_WRAP2(fremovexattr, int, fd, const char __user *, name); | 126 | COMPAT_SYSCALL_WRAP2(fremovexattr, int, fd, const char __user *, name); |
127 | COMPAT_SYSCALL_WRAP1(exit_group, int, error_code); | ||
128 | COMPAT_SYSCALL_WRAP1(set_tid_address, int __user *, tidptr); | ||
129 | COMPAT_SYSCALL_WRAP1(epoll_create, int, size); | ||
130 | COMPAT_SYSCALL_WRAP4(epoll_ctl, int, epfd, int, op, int, fd, struct epoll_event __user *, event); | ||
131 | COMPAT_SYSCALL_WRAP4(epoll_wait, int, epfd, struct epoll_event __user *, events, int, maxevents, int, timeout); | ||
132 | COMPAT_SYSCALL_WRAP1(timer_getoverrun, timer_t, timer_id); | ||
133 | COMPAT_SYSCALL_WRAP1(timer_delete, compat_timer_t, compat_timer_id); | ||
134 | COMPAT_SYSCALL_WRAP1(io_destroy, compat_aio_context_t, ctx); | ||
135 | COMPAT_SYSCALL_WRAP3(io_cancel, compat_aio_context_t, ctx_id, struct iocb __user *, iocb, struct io_event __user *, result); | ||
136 | COMPAT_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 | ||
184 | ENTRY(sys32_exit_group_wrapper) | ||
185 | lgfr %r2,%r2 # int | ||
186 | jg sys_exit_group # branch to system call | ||
187 | |||
188 | ENTRY(sys32_set_tid_address_wrapper) | ||
189 | llgtr %r2,%r2 # int * | ||
190 | jg sys_set_tid_address # branch to system call | ||
191 | |||
192 | ENTRY(sys_epoll_create_wrapper) | ||
193 | lgfr %r2,%r2 # int | ||
194 | jg sys_epoll_create # branch to system call | ||
195 | |||
196 | ENTRY(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 | |||
203 | ENTRY(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 | |||
210 | ENTRY(sys32_clock_settime_wrapper) | 184 | ENTRY(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 | ||
250 | ENTRY(sys32_timer_getoverrun_wrapper) | ||
251 | lgfr %r2,%r2 # timer_t (int) | ||
252 | jg sys_timer_getoverrun | ||
253 | |||
254 | ENTRY(sys32_timer_delete_wrapper) | ||
255 | lgfr %r2,%r2 # timer_t (int) | ||
256 | jg sys_timer_delete | ||
257 | |||
258 | ENTRY(sys32_io_setup_wrapper) | 224 | ENTRY(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 | ||
263 | ENTRY(sys32_io_destroy_wrapper) | ||
264 | llgfr %r2,%r2 # (aio_context_t) u32 | ||
265 | jg sys_io_destroy | ||
266 | |||
267 | ENTRY(sys32_io_getevents_wrapper) | 229 | ENTRY(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 | ||
281 | ENTRY(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 | |||
287 | ENTRY(compat_sys_statfs64_wrapper) | 243 | ENTRY(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 | ||
306 | ENTRY(sys32_mq_unlink_wrapper) | ||
307 | llgtr %r2,%r2 # const char * | ||
308 | jg sys_mq_unlink | ||
309 | |||
310 | ENTRY(compat_sys_mq_timedsend_wrapper) | 262 | ENTRY(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 | |||
252 | SYSCALL(sys_tgkill,sys_tgkill,sys_tgkill_wrapper) | 252 | SYSCALL(sys_tgkill,sys_tgkill,sys_tgkill_wrapper) |
253 | NI_SYSCALL /* reserved for TUX */ | 253 | NI_SYSCALL /* reserved for TUX */ |
254 | SYSCALL(sys_io_setup,sys_io_setup,sys32_io_setup_wrapper) | 254 | SYSCALL(sys_io_setup,sys_io_setup,sys32_io_setup_wrapper) |
255 | SYSCALL(sys_io_destroy,sys_io_destroy,sys32_io_destroy_wrapper) | 255 | SYSCALL(sys_io_destroy,sys_io_destroy,compat_sys_io_destroy) |
256 | SYSCALL(sys_io_getevents,sys_io_getevents,sys32_io_getevents_wrapper) /* 245 */ | 256 | SYSCALL(sys_io_getevents,sys_io_getevents,sys32_io_getevents_wrapper) /* 245 */ |
257 | SYSCALL(sys_io_submit,sys_io_submit,sys32_io_submit_wrapper) | 257 | SYSCALL(sys_io_submit,sys_io_submit,sys32_io_submit_wrapper) |
258 | SYSCALL(sys_io_cancel,sys_io_cancel,sys32_io_cancel_wrapper) | 258 | SYSCALL(sys_io_cancel,sys_io_cancel,compat_sys_io_cancel) |
259 | SYSCALL(sys_exit_group,sys_exit_group,sys32_exit_group_wrapper) | 259 | SYSCALL(sys_exit_group,sys_exit_group,compat_sys_exit_group) |
260 | SYSCALL(sys_epoll_create,sys_epoll_create,sys_epoll_create_wrapper) | 260 | SYSCALL(sys_epoll_create,sys_epoll_create,compat_sys_epoll_create) |
261 | SYSCALL(sys_epoll_ctl,sys_epoll_ctl,sys_epoll_ctl_wrapper) /* 250 */ | 261 | SYSCALL(sys_epoll_ctl,sys_epoll_ctl,compat_sys_epoll_ctl) /* 250 */ |
262 | SYSCALL(sys_epoll_wait,sys_epoll_wait,sys_epoll_wait_wrapper) | 262 | SYSCALL(sys_epoll_wait,sys_epoll_wait,compat_sys_epoll_wait) |
263 | SYSCALL(sys_set_tid_address,sys_set_tid_address,sys32_set_tid_address_wrapper) | 263 | SYSCALL(sys_set_tid_address,sys_set_tid_address,compat_sys_set_tid_address) |
264 | SYSCALL(sys_s390_fadvise64,sys_fadvise64_64,compat_sys_s390_fadvise64) | 264 | SYSCALL(sys_s390_fadvise64,sys_fadvise64_64,compat_sys_s390_fadvise64) |
265 | SYSCALL(sys_timer_create,sys_timer_create,sys32_timer_create_wrapper) | 265 | SYSCALL(sys_timer_create,sys_timer_create,sys32_timer_create_wrapper) |
266 | SYSCALL(sys_timer_settime,sys_timer_settime,sys32_timer_settime_wrapper) /* 255 */ | 266 | SYSCALL(sys_timer_settime,sys_timer_settime,sys32_timer_settime_wrapper) /* 255 */ |
267 | SYSCALL(sys_timer_gettime,sys_timer_gettime,sys32_timer_gettime_wrapper) | 267 | SYSCALL(sys_timer_gettime,sys_timer_gettime,sys32_timer_gettime_wrapper) |
268 | SYSCALL(sys_timer_getoverrun,sys_timer_getoverrun,sys32_timer_getoverrun_wrapper) | 268 | SYSCALL(sys_timer_getoverrun,sys_timer_getoverrun,compat_sys_timer_getoverrun) |
269 | SYSCALL(sys_timer_delete,sys_timer_delete,sys32_timer_delete_wrapper) | 269 | SYSCALL(sys_timer_delete,sys_timer_delete,compat_sys_timer_delete) |
270 | SYSCALL(sys_clock_settime,sys_clock_settime,sys32_clock_settime_wrapper) | 270 | SYSCALL(sys_clock_settime,sys_clock_settime,sys32_clock_settime_wrapper) |
271 | SYSCALL(sys_clock_gettime,sys_clock_gettime,sys32_clock_gettime_wrapper) /* 260 */ | 271 | SYSCALL(sys_clock_gettime,sys_clock_gettime,sys32_clock_gettime_wrapper) /* 260 */ |
272 | SYSCALL(sys_clock_getres,sys_clock_getres,sys32_clock_getres_wrapper) | 272 | SYSCALL(sys_clock_getres,sys_clock_getres,sys32_clock_getres_wrapper) |
@@ -280,7 +280,7 @@ NI_SYSCALL /* 268 sys_mbind */ | |||
280 | NI_SYSCALL /* 269 sys_get_mempolicy */ | 280 | NI_SYSCALL /* 269 sys_get_mempolicy */ |
281 | NI_SYSCALL /* 270 sys_set_mempolicy */ | 281 | NI_SYSCALL /* 270 sys_set_mempolicy */ |
282 | SYSCALL(sys_mq_open,sys_mq_open,compat_sys_mq_open_wrapper) | 282 | SYSCALL(sys_mq_open,sys_mq_open,compat_sys_mq_open_wrapper) |
283 | SYSCALL(sys_mq_unlink,sys_mq_unlink,sys32_mq_unlink_wrapper) | 283 | SYSCALL(sys_mq_unlink,sys_mq_unlink,compat_sys_mq_unlink) |
284 | SYSCALL(sys_mq_timedsend,sys_mq_timedsend,compat_sys_mq_timedsend_wrapper) | 284 | SYSCALL(sys_mq_timedsend,sys_mq_timedsend,compat_sys_mq_timedsend_wrapper) |
285 | SYSCALL(sys_mq_timedreceive,sys_mq_timedreceive,compat_sys_mq_timedreceive_wrapper) | 285 | SYSCALL(sys_mq_timedreceive,sys_mq_timedreceive,compat_sys_mq_timedreceive_wrapper) |
286 | SYSCALL(sys_mq_notify,sys_mq_notify,compat_sys_mq_notify_wrapper) /* 275 */ | 286 | SYSCALL(sys_mq_notify,sys_mq_notify,compat_sys_mq_notify_wrapper) /* 275 */ |