aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2014-02-27 08:20:53 -0500
committerHeiko Carstens <heiko.carstens@de.ibm.com>2014-03-04 03:05:40 -0500
commitc355ce182a2e3f88d6382a9720be61369c38c5c7 (patch)
tree4cc1ef8a3e95a0c922a6297c1c5352e64b5ff5a0 /arch
parentbe06fbf816020a846991ef7f5489ac0027320ea3 (diff)
s390/compat: convert system call wrappers to C part 04
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/kernel/compat_wrap.c10
-rw-r--r--arch/s390/kernel/compat_wrapper.S57
-rw-r--r--arch/s390/kernel/syscalls.S20
3 files changed, 20 insertions, 67 deletions
diff --git a/arch/s390/kernel/compat_wrap.c b/arch/s390/kernel/compat_wrap.c
index ac26ee715553..f2b85401a998 100644
--- a/arch/s390/kernel/compat_wrap.c
+++ b/arch/s390/kernel/compat_wrap.c
@@ -53,3 +53,13 @@ COMPAT_SYSCALL_WRAP2(symlink, const char __user *, old, const char __user *, new
53COMPAT_SYSCALL_WRAP3(readlink, const char __user *, path, char __user *, buf, int, bufsiz); 53COMPAT_SYSCALL_WRAP3(readlink, const char __user *, path, char __user *, buf, int, bufsiz);
54COMPAT_SYSCALL_WRAP1(uselib, const char __user *, library); 54COMPAT_SYSCALL_WRAP1(uselib, const char __user *, library);
55COMPAT_SYSCALL_WRAP2(swapon, const char __user *, specialfile, int, swap_flags); 55COMPAT_SYSCALL_WRAP2(swapon, const char __user *, specialfile, int, swap_flags);
56COMPAT_SYSCALL_WRAP4(reboot, int, magic1, int, magic2, unsigned int, cmd, void __user *, arg);
57COMPAT_SYSCALL_WRAP2(munmap, compat_ulong_t, addr, compat_size_t, len);
58COMPAT_SYSCALL_WRAP2(fchmod, unsigned int, fd, umode_t, mode);
59COMPAT_SYSCALL_WRAP2(getpriority, int, which, int, who);
60COMPAT_SYSCALL_WRAP3(setpriority, int, which, int, who, int, niceval);
61COMPAT_SYSCALL_WRAP3(syslog, int, type, char __user *, buf, int, len);
62COMPAT_SYSCALL_WRAP1(swapoff, const char __user *, specialfile);
63COMPAT_SYSCALL_WRAP1(fsync, unsigned int, fd);
64COMPAT_SYSCALL_WRAP2(setdomainname, char __user *, name, int, len);
65COMPAT_SYSCALL_WRAP1(newuname, struct new_utsname __user *, name);
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S
index 359751108b8b..3ea908f563f6 100644
--- a/arch/s390/kernel/compat_wrapper.S
+++ b/arch/s390/kernel/compat_wrapper.S
@@ -84,40 +84,12 @@ ENTRY(compat_sys_settimeofday_wrapper)
84 llgtr %r3,%r3 # struct timezone * 84 llgtr %r3,%r3 # struct timezone *
85 jg compat_sys_settimeofday # branch to system call 85 jg compat_sys_settimeofday # branch to system call
86 86
87ENTRY(sys32_reboot_wrapper)
88 lgfr %r2,%r2 # int
89 lgfr %r3,%r3 # int
90 llgfr %r4,%r4 # unsigned int
91 llgtr %r5,%r5 # void *
92 jg sys_reboot # branch to system call
93
94ENTRY(old32_readdir_wrapper) 87ENTRY(old32_readdir_wrapper)
95 llgfr %r2,%r2 # unsigned int 88 llgfr %r2,%r2 # unsigned int
96 llgtr %r3,%r3 # void * 89 llgtr %r3,%r3 # void *
97 llgfr %r4,%r4 # unsigned int 90 llgfr %r4,%r4 # unsigned int
98 jg compat_sys_old_readdir # branch to system call 91 jg compat_sys_old_readdir # branch to system call
99 92
100ENTRY(sys32_munmap_wrapper)
101 llgfr %r2,%r2 # unsigned long
102 llgfr %r3,%r3 # size_t
103 jg sys_munmap # branch to system call
104
105ENTRY(sys32_fchmod_wrapper)
106 llgfr %r2,%r2 # unsigned int
107 llgfr %r3,%r3 # mode_t
108 jg sys_fchmod # branch to system call
109
110ENTRY(sys32_getpriority_wrapper)
111 lgfr %r2,%r2 # int
112 lgfr %r3,%r3 # int
113 jg sys_getpriority # branch to system call
114
115ENTRY(sys32_setpriority_wrapper)
116 lgfr %r2,%r2 # int
117 lgfr %r3,%r3 # int
118 lgfr %r4,%r4 # int
119 jg sys_setpriority # branch to system call
120
121ENTRY(compat_sys_statfs_wrapper) 93ENTRY(compat_sys_statfs_wrapper)
122 llgtr %r2,%r2 # char * 94 llgtr %r2,%r2 # char *
123 llgtr %r3,%r3 # struct compat_statfs * 95 llgtr %r3,%r3 # struct compat_statfs *
@@ -133,12 +105,6 @@ ENTRY(compat_sys_socketcall_wrapper)
133 llgtr %r3,%r3 # u32 * 105 llgtr %r3,%r3 # u32 *
134 jg compat_sys_socketcall # branch to system call 106 jg compat_sys_socketcall # branch to system call
135 107
136ENTRY(sys32_syslog_wrapper)
137 lgfr %r2,%r2 # int
138 llgtr %r3,%r3 # char *
139 lgfr %r4,%r4 # int
140 jg sys_syslog # branch to system call
141
142ENTRY(compat_sys_newstat_wrapper) 108ENTRY(compat_sys_newstat_wrapper)
143 llgtr %r2,%r2 # char * 109 llgtr %r2,%r2 # char *
144 llgtr %r3,%r3 # struct stat_emu31 * 110 llgtr %r3,%r3 # struct stat_emu31 *
@@ -154,33 +120,10 @@ ENTRY(compat_sys_newfstat_wrapper)
154 llgtr %r3,%r3 # struct stat_emu31 * 120 llgtr %r3,%r3 # struct stat_emu31 *
155 jg compat_sys_newfstat # branch to system call 121 jg compat_sys_newfstat # branch to system call
156 122
157#sys32_vhangup_wrapper # void
158
159ENTRY(sys32_swapoff_wrapper)
160 llgtr %r2,%r2 # const char *
161 jg sys_swapoff # branch to system call
162
163ENTRY(compat_sys_sysinfo_wrapper) 123ENTRY(compat_sys_sysinfo_wrapper)
164 llgtr %r2,%r2 # struct sysinfo_emu31 * 124 llgtr %r2,%r2 # struct sysinfo_emu31 *
165 jg compat_sys_sysinfo # branch to system call 125 jg compat_sys_sysinfo # branch to system call
166 126
167ENTRY(sys32_fsync_wrapper)
168 llgfr %r2,%r2 # unsigned int
169 jg sys_fsync # branch to system call
170
171#sys32_sigreturn_wrapper # done in sigreturn_glue
172
173#sys32_clone_wrapper # done in clone_glue
174
175ENTRY(sys32_setdomainname_wrapper)
176 llgtr %r2,%r2 # char *
177 lgfr %r3,%r3 # int
178 jg sys_setdomainname # branch to system call
179
180ENTRY(sys32_newuname_wrapper)
181 llgtr %r2,%r2 # struct new_utsname *
182 jg sys_newuname # branch to system call
183
184ENTRY(compat_sys_adjtimex_wrapper) 127ENTRY(compat_sys_adjtimex_wrapper)
185 llgtr %r2,%r2 # struct compat_timex * 128 llgtr %r2,%r2 # struct compat_timex *
186 jg compat_sys_adjtimex # branch to system call 129 jg compat_sys_adjtimex # branch to system call
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S
index 5bc24d9167dc..4cf5a52de2ba 100644
--- a/arch/s390/kernel/syscalls.S
+++ b/arch/s390/kernel/syscalls.S
@@ -96,22 +96,22 @@ NI_SYSCALL /* old lstat syscall */
96SYSCALL(sys_readlink,sys_readlink,compat_sys_readlink) /* 85 */ 96SYSCALL(sys_readlink,sys_readlink,compat_sys_readlink) /* 85 */
97SYSCALL(sys_uselib,sys_uselib,compat_sys_uselib) 97SYSCALL(sys_uselib,sys_uselib,compat_sys_uselib)
98SYSCALL(sys_swapon,sys_swapon,compat_sys_swapon) 98SYSCALL(sys_swapon,sys_swapon,compat_sys_swapon)
99SYSCALL(sys_reboot,sys_reboot,sys32_reboot_wrapper) 99SYSCALL(sys_reboot,sys_reboot,compat_sys_reboot)
100SYSCALL(sys_ni_syscall,sys_ni_syscall,old32_readdir_wrapper) /* old readdir syscall */ 100SYSCALL(sys_ni_syscall,sys_ni_syscall,old32_readdir_wrapper) /* old readdir syscall */
101SYSCALL(sys_old_mmap,sys_old_mmap,compat_sys_s390_old_mmap) /* 90 */ 101SYSCALL(sys_old_mmap,sys_old_mmap,compat_sys_s390_old_mmap) /* 90 */
102SYSCALL(sys_munmap,sys_munmap,sys32_munmap_wrapper) 102SYSCALL(sys_munmap,sys_munmap,compat_sys_munmap)
103SYSCALL(sys_truncate,sys_truncate,compat_sys_truncate) 103SYSCALL(sys_truncate,sys_truncate,compat_sys_truncate)
104SYSCALL(sys_ftruncate,sys_ftruncate,compat_sys_ftruncate) 104SYSCALL(sys_ftruncate,sys_ftruncate,compat_sys_ftruncate)
105SYSCALL(sys_fchmod,sys_fchmod,sys32_fchmod_wrapper) 105SYSCALL(sys_fchmod,sys_fchmod,compat_sys_fchmod)
106SYSCALL(sys_fchown16,sys_ni_syscall,compat_sys_s390_fchown16) /* 95 old fchown16 syscall*/ 106SYSCALL(sys_fchown16,sys_ni_syscall,compat_sys_s390_fchown16) /* 95 old fchown16 syscall*/
107SYSCALL(sys_getpriority,sys_getpriority,sys32_getpriority_wrapper) 107SYSCALL(sys_getpriority,sys_getpriority,compat_sys_getpriority)
108SYSCALL(sys_setpriority,sys_setpriority,sys32_setpriority_wrapper) 108SYSCALL(sys_setpriority,sys_setpriority,compat_sys_setpriority)
109NI_SYSCALL /* old profil syscall */ 109NI_SYSCALL /* old profil syscall */
110SYSCALL(sys_statfs,sys_statfs,compat_sys_statfs_wrapper) 110SYSCALL(sys_statfs,sys_statfs,compat_sys_statfs_wrapper)
111SYSCALL(sys_fstatfs,sys_fstatfs,compat_sys_fstatfs_wrapper) /* 100 */ 111SYSCALL(sys_fstatfs,sys_fstatfs,compat_sys_fstatfs_wrapper) /* 100 */
112NI_SYSCALL /* ioperm for i386 */ 112NI_SYSCALL /* ioperm for i386 */
113SYSCALL(sys_socketcall,sys_socketcall,compat_sys_socketcall_wrapper) 113SYSCALL(sys_socketcall,sys_socketcall,compat_sys_socketcall_wrapper)
114SYSCALL(sys_syslog,sys_syslog,sys32_syslog_wrapper) 114SYSCALL(sys_syslog,sys_syslog,compat_sys_syslog)
115SYSCALL(sys_setitimer,sys_setitimer,compat_sys_setitimer) 115SYSCALL(sys_setitimer,sys_setitimer,compat_sys_setitimer)
116SYSCALL(sys_getitimer,sys_getitimer,compat_sys_getitimer) /* 105 */ 116SYSCALL(sys_getitimer,sys_getitimer,compat_sys_getitimer) /* 105 */
117SYSCALL(sys_newstat,sys_newstat,compat_sys_newstat_wrapper) 117SYSCALL(sys_newstat,sys_newstat,compat_sys_newstat_wrapper)
@@ -123,14 +123,14 @@ SYSCALL(sys_vhangup,sys_vhangup,sys_vhangup)
123NI_SYSCALL /* old "idle" system call */ 123NI_SYSCALL /* old "idle" system call */
124NI_SYSCALL /* vm86old for i386 */ 124NI_SYSCALL /* vm86old for i386 */
125SYSCALL(sys_wait4,sys_wait4,compat_sys_wait4) 125SYSCALL(sys_wait4,sys_wait4,compat_sys_wait4)
126SYSCALL(sys_swapoff,sys_swapoff,sys32_swapoff_wrapper) /* 115 */ 126SYSCALL(sys_swapoff,sys_swapoff,compat_sys_swapoff) /* 115 */
127SYSCALL(sys_sysinfo,sys_sysinfo,compat_sys_sysinfo_wrapper) 127SYSCALL(sys_sysinfo,sys_sysinfo,compat_sys_sysinfo_wrapper)
128SYSCALL(sys_s390_ipc,sys_s390_ipc,compat_sys_s390_ipc) 128SYSCALL(sys_s390_ipc,sys_s390_ipc,compat_sys_s390_ipc)
129SYSCALL(sys_fsync,sys_fsync,sys32_fsync_wrapper) 129SYSCALL(sys_fsync,sys_fsync,compat_sys_fsync)
130SYSCALL(sys_sigreturn,sys_sigreturn,sys32_sigreturn) 130SYSCALL(sys_sigreturn,sys_sigreturn,sys32_sigreturn)
131SYSCALL(sys_clone,sys_clone,sys_clone_wrapper) /* 120 */ 131SYSCALL(sys_clone,sys_clone,sys_clone_wrapper) /* 120 */
132SYSCALL(sys_setdomainname,sys_setdomainname,sys32_setdomainname_wrapper) 132SYSCALL(sys_setdomainname,sys_setdomainname,compat_sys_setdomainname)
133SYSCALL(sys_newuname,sys_newuname,sys32_newuname_wrapper) 133SYSCALL(sys_newuname,sys_newuname,compat_sys_newuname)
134NI_SYSCALL /* modify_ldt for i386 */ 134NI_SYSCALL /* modify_ldt for i386 */
135SYSCALL(sys_adjtimex,sys_adjtimex,compat_sys_adjtimex_wrapper) 135SYSCALL(sys_adjtimex,sys_adjtimex,compat_sys_adjtimex_wrapper)
136SYSCALL(sys_mprotect,sys_mprotect,sys32_mprotect_wrapper) /* 125 */ 136SYSCALL(sys_mprotect,sys_mprotect,sys32_mprotect_wrapper) /* 125 */