diff options
Diffstat (limited to 'arch/s390/kernel/sys_s390.c')
-rw-r--r-- | arch/s390/kernel/sys_s390.c | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c index c34be4568b80..c7ae4b17e0e3 100644 --- a/arch/s390/kernel/sys_s390.c +++ b/arch/s390/kernel/sys_s390.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/personality.h> | 29 | #include <linux/personality.h> |
30 | #include <linux/unistd.h> | 30 | #include <linux/unistd.h> |
31 | #include <linux/ipc.h> | 31 | #include <linux/ipc.h> |
32 | #include <linux/syscalls.h> | ||
32 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
33 | #include "entry.h" | 34 | #include "entry.h" |
34 | 35 | ||
@@ -74,7 +75,7 @@ struct mmap_arg_struct { | |||
74 | unsigned long offset; | 75 | unsigned long offset; |
75 | }; | 76 | }; |
76 | 77 | ||
77 | asmlinkage long sys_mmap2(struct mmap_arg_struct __user *arg) | 78 | SYSCALL_DEFINE1(mmap2, struct mmap_arg_struct __user *, arg) |
78 | { | 79 | { |
79 | struct mmap_arg_struct a; | 80 | struct mmap_arg_struct a; |
80 | int error = -EFAULT; | 81 | int error = -EFAULT; |
@@ -86,7 +87,7 @@ out: | |||
86 | return error; | 87 | return error; |
87 | } | 88 | } |
88 | 89 | ||
89 | asmlinkage long old_mmap(struct mmap_arg_struct __user *arg) | 90 | SYSCALL_DEFINE1(s390_old_mmap, struct mmap_arg_struct __user *, arg) |
90 | { | 91 | { |
91 | struct mmap_arg_struct a; | 92 | struct mmap_arg_struct a; |
92 | long error = -EFAULT; | 93 | long error = -EFAULT; |
@@ -108,8 +109,8 @@ out: | |||
108 | * | 109 | * |
109 | * This is really horribly ugly. | 110 | * This is really horribly ugly. |
110 | */ | 111 | */ |
111 | asmlinkage long sys_ipc(uint call, int first, unsigned long second, | 112 | SYSCALL_DEFINE5(ipc, uint, call, int, first, unsigned long, second, |
112 | unsigned long third, void __user *ptr) | 113 | unsigned long, third, void __user *, ptr) |
113 | { | 114 | { |
114 | struct ipc_kludge tmp; | 115 | struct ipc_kludge tmp; |
115 | int ret; | 116 | int ret; |
@@ -175,7 +176,7 @@ asmlinkage long sys_ipc(uint call, int first, unsigned long second, | |||
175 | } | 176 | } |
176 | 177 | ||
177 | #ifdef CONFIG_64BIT | 178 | #ifdef CONFIG_64BIT |
178 | asmlinkage long s390x_newuname(struct new_utsname __user *name) | 179 | SYSCALL_DEFINE1(s390_newuname, struct new_utsname __user *, name) |
179 | { | 180 | { |
180 | int ret = sys_newuname(name); | 181 | int ret = sys_newuname(name); |
181 | 182 | ||
@@ -186,7 +187,7 @@ asmlinkage long s390x_newuname(struct new_utsname __user *name) | |||
186 | return ret; | 187 | return ret; |
187 | } | 188 | } |
188 | 189 | ||
189 | asmlinkage long s390x_personality(unsigned long personality) | 190 | SYSCALL_DEFINE1(s390_personality, unsigned long, personality) |
190 | { | 191 | { |
191 | int ret; | 192 | int ret; |
192 | 193 | ||
@@ -205,15 +206,13 @@ asmlinkage long s390x_personality(unsigned long personality) | |||
205 | */ | 206 | */ |
206 | #ifndef CONFIG_64BIT | 207 | #ifndef CONFIG_64BIT |
207 | 208 | ||
208 | asmlinkage long | 209 | SYSCALL_DEFINE5(s390_fadvise64, int, fd, u32, offset_high, u32, offset_low, |
209 | s390_fadvise64(int fd, u32 offset_high, u32 offset_low, size_t len, int advice) | 210 | size_t, len, int, advice) |
210 | { | 211 | { |
211 | return sys_fadvise64(fd, (u64) offset_high << 32 | offset_low, | 212 | return sys_fadvise64(fd, (u64) offset_high << 32 | offset_low, |
212 | len, advice); | 213 | len, advice); |
213 | } | 214 | } |
214 | 215 | ||
215 | #endif | ||
216 | |||
217 | struct fadvise64_64_args { | 216 | struct fadvise64_64_args { |
218 | int fd; | 217 | int fd; |
219 | long long offset; | 218 | long long offset; |
@@ -221,8 +220,7 @@ struct fadvise64_64_args { | |||
221 | int advice; | 220 | int advice; |
222 | }; | 221 | }; |
223 | 222 | ||
224 | asmlinkage long | 223 | SYSCALL_DEFINE1(s390_fadvise64_64, struct fadvise64_64_args __user *, args) |
225 | s390_fadvise64_64(struct fadvise64_64_args __user *args) | ||
226 | { | 224 | { |
227 | struct fadvise64_64_args a; | 225 | struct fadvise64_64_args a; |
228 | 226 | ||
@@ -231,7 +229,6 @@ s390_fadvise64_64(struct fadvise64_64_args __user *args) | |||
231 | return sys_fadvise64_64(a.fd, a.offset, a.len, a.advice); | 229 | return sys_fadvise64_64(a.fd, a.offset, a.len, a.advice); |
232 | } | 230 | } |
233 | 231 | ||
234 | #ifndef CONFIG_64BIT | ||
235 | /* | 232 | /* |
236 | * This is a wrapper to call sys_fallocate(). For 31 bit s390 the last | 233 | * This is a wrapper to call sys_fallocate(). For 31 bit s390 the last |
237 | * 64 bit argument "len" is split into the upper and lower 32 bits. The | 234 | * 64 bit argument "len" is split into the upper and lower 32 bits. The |
@@ -244,9 +241,19 @@ s390_fadvise64_64(struct fadvise64_64_args __user *args) | |||
244 | * to | 241 | * to |
245 | * %r2: fd, %r3: mode, %r4/%r5: offset, 96(%r15)-103(%r15): len | 242 | * %r2: fd, %r3: mode, %r4/%r5: offset, 96(%r15)-103(%r15): len |
246 | */ | 243 | */ |
247 | asmlinkage long s390_fallocate(int fd, int mode, loff_t offset, | 244 | SYSCALL_DEFINE(s390_fallocate)(int fd, int mode, loff_t offset, |
248 | u32 len_high, u32 len_low) | 245 | u32 len_high, u32 len_low) |
249 | { | 246 | { |
250 | return sys_fallocate(fd, mode, offset, ((u64)len_high << 32) | len_low); | 247 | return sys_fallocate(fd, mode, offset, ((u64)len_high << 32) | len_low); |
251 | } | 248 | } |
249 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | ||
250 | asmlinkage long SyS_s390_fallocate(long fd, long mode, loff_t offset, | ||
251 | long len_high, long len_low) | ||
252 | { | ||
253 | return SYSC_s390_fallocate((int) fd, (int) mode, offset, | ||
254 | (u32) len_high, (u32) len_low); | ||
255 | } | ||
256 | SYSCALL_ALIAS(sys_s390_fallocate, SyS_s390_fallocate); | ||
257 | #endif | ||
258 | |||
252 | #endif | 259 | #endif |