aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/compat_wrapper.S
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2014-02-27 03:52:01 -0500
committerHeiko Carstens <heiko.carstens@de.ibm.com>2014-03-04 03:05:38 -0500
commitb07edab23c7f93db0e7ab09bd7f5eddc421f6e8c (patch)
treee2234efdafec06a41c47dd705081406026122492 /arch/s390/kernel/compat_wrapper.S
parent5383d2c8b3ee61a762043818d7c07bbc0049b031 (diff)
s390/compat: convert system call wrappers to C part 01
Introduce a new compat_wrap.c file which contains the s390 specific compat system call wrappers. The s390 specific system call wrappers only perform sign, zero and pointer conversion of system call arguments before actually calling the non-compat system call. Therefore introduce COMPAT_SYSCALL_WRAPx macros which generate C code that is nearly identical to the assembly code. This has the advantage that the compile will generate correct code, and we avoid the frequent copy-paste errors seen in the compat_wrapper.S file. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/compat_wrapper.S')
-rw-r--r--arch/s390/kernel/compat_wrapper.S56
1 files changed, 0 insertions, 56 deletions
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
index 16ce71880cbd..09e65cd2e24e 100644
--- a/arch/s390/kernel/compat_wrapper.S
+++ b/arch/s390/kernel/compat_wrapper.S
@@ -8,47 +8,10 @@
8 8
9#include <linux/linkage.h> 9#include <linux/linkage.h>
10 10
11ENTRY(sys32_exit_wrapper)
12 lgfr %r2,%r2 # int
13 jg sys_exit # branch to sys_exit
14
15ENTRY(sys32_close_wrapper)
16 llgfr %r2,%r2 # unsigned int
17 jg sys_close # branch to system call
18
19ENTRY(sys32_creat_wrapper)
20 llgtr %r2,%r2 # const char *
21 lgfr %r3,%r3 # int
22 jg sys_creat # branch to system call
23
24ENTRY(sys32_link_wrapper)
25 llgtr %r2,%r2 # const char *
26 llgtr %r3,%r3 # const char *
27 jg sys_link # branch to system call
28
29ENTRY(sys32_unlink_wrapper)
30 llgtr %r2,%r2 # const char *
31 jg sys_unlink # branch to system call
32
33ENTRY(sys32_chdir_wrapper)
34 llgtr %r2,%r2 # const char *
35 jg sys_chdir # branch to system call
36
37ENTRY(sys32_time_wrapper) 11ENTRY(sys32_time_wrapper)
38 llgtr %r2,%r2 # int * 12 llgtr %r2,%r2 # int *
39 jg compat_sys_time # branch to system call 13 jg compat_sys_time # branch to system call
40 14
41ENTRY(sys32_mknod_wrapper)
42 llgtr %r2,%r2 # const char *
43 lgfr %r3,%r3 # int
44 llgfr %r4,%r4 # dev
45 jg sys_mknod # branch to system call
46
47ENTRY(sys32_chmod_wrapper)
48 llgtr %r2,%r2 # const char *
49 llgfr %r3,%r3 # mode_t
50 jg sys_chmod # branch to system call
51
52#sys32_getpid_wrapper # void 15#sys32_getpid_wrapper # void
53 16
54ENTRY(sys32_mount_wrapper) 17ENTRY(sys32_mount_wrapper)
@@ -59,10 +22,6 @@ ENTRY(sys32_mount_wrapper)
59 llgtr %r6,%r6 # void * 22 llgtr %r6,%r6 # void *
60 jg compat_sys_mount # branch to system call 23 jg compat_sys_mount # branch to system call
61 24
62ENTRY(sys32_oldumount_wrapper)
63 llgtr %r2,%r2 # char *
64 jg sys_oldumount # branch to system call
65
66ENTRY(sys32_ptrace_wrapper) 25ENTRY(sys32_ptrace_wrapper)
67 lgfr %r2,%r2 # long 26 lgfr %r2,%r2 # long
68 lgfr %r3,%r3 # long 27 lgfr %r3,%r3 # long
@@ -70,26 +29,11 @@ ENTRY(sys32_ptrace_wrapper)
70 llgfr %r5,%r5 # long 29 llgfr %r5,%r5 # long
71 jg compat_sys_ptrace # branch to system call 30 jg compat_sys_ptrace # branch to system call
72 31
73ENTRY(sys32_alarm_wrapper)
74 llgfr %r2,%r2 # unsigned int
75 jg sys_alarm # branch to system call
76
77ENTRY(compat_sys_utime_wrapper) 32ENTRY(compat_sys_utime_wrapper)
78 llgtr %r2,%r2 # char * 33 llgtr %r2,%r2 # char *
79 llgtr %r3,%r3 # struct compat_utimbuf * 34 llgtr %r3,%r3 # struct compat_utimbuf *
80 jg compat_sys_utime # branch to system call 35 jg compat_sys_utime # branch to system call
81 36
82ENTRY(sys32_access_wrapper)
83 llgtr %r2,%r2 # const char *
84 lgfr %r3,%r3 # int
85 jg sys_access # branch to system call
86
87ENTRY(sys32_nice_wrapper)
88 lgfr %r2,%r2 # int
89 jg sys_nice # branch to system call
90
91#sys32_sync_wrapper # void
92
93ENTRY(sys32_kill_wrapper) 37ENTRY(sys32_kill_wrapper)
94 lgfr %r2,%r2 # int 38 lgfr %r2,%r2 # int
95 lgfr %r3,%r3 # int 39 lgfr %r3,%r3 # int