diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2006-12-17 13:23:10 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-12-17 13:23:31 -0500 |
commit | 5a059f1ac0ed0c937257027aed5da50241f5ec2b (patch) | |
tree | 492d0a8bf452167baa9b941edc1d8edf9577ed7b | |
parent | 99f5e9718185f07458ae70c2282c2153a2256c91 (diff) |
[ARM] Add more syscalls
Add:
sys_unshare
sys_set_robust_list
sys_get_robust_list
sys_splice
sys_arm_sync_file_range
sys_tee
sys_vmsplice
sys_move_pages
sys_getcpu
Special note about sys_arm_sync_file_range(), which is implemented as:
asmlinkage long sys_arm_sync_file_range(int fd, unsigned int flags,
loff_t offset, loff_t nbytes)
{
return sys_sync_file_range(fd, offset, nbytes, flags);
}
We can't export sys_sync_file_range() directly on ARM because the
argument list someone picked does not fit in the available registers.
Would be nice if... there was an arch maintainer review mechanism for
new syscalls before they hit the kernel.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/kernel/calls.S | 24 | ||||
-rw-r--r-- | arch/arm/kernel/sys_arm.c | 13 | ||||
-rw-r--r-- | include/asm-arm/unistd.h | 12 |
3 files changed, 43 insertions, 6 deletions
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index e8f74363328c..f7598cbc7ec5 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S | |||
@@ -110,7 +110,7 @@ | |||
110 | CALL(sys_ni_syscall) /* was sys_profil */ | 110 | CALL(sys_ni_syscall) /* was sys_profil */ |
111 | CALL(sys_statfs) | 111 | CALL(sys_statfs) |
112 | /* 100 */ CALL(sys_fstatfs) | 112 | /* 100 */ CALL(sys_fstatfs) |
113 | CALL(sys_ni_syscall) | 113 | CALL(sys_ni_syscall) /* sys_ioperm */ |
114 | CALL(OBSOLETE(ABI(sys_socketcall, sys_oabi_socketcall))) | 114 | CALL(OBSOLETE(ABI(sys_socketcall, sys_oabi_socketcall))) |
115 | CALL(sys_syslog) | 115 | CALL(sys_syslog) |
116 | CALL(sys_setitimer) | 116 | CALL(sys_setitimer) |
@@ -132,7 +132,7 @@ | |||
132 | /* 120 */ CALL(sys_clone_wrapper) | 132 | /* 120 */ CALL(sys_clone_wrapper) |
133 | CALL(sys_setdomainname) | 133 | CALL(sys_setdomainname) |
134 | CALL(sys_newuname) | 134 | CALL(sys_newuname) |
135 | CALL(sys_ni_syscall) | 135 | CALL(sys_ni_syscall) /* modify_ldt */ |
136 | CALL(sys_adjtimex) | 136 | CALL(sys_adjtimex) |
137 | /* 125 */ CALL(sys_mprotect) | 137 | /* 125 */ CALL(sys_mprotect) |
138 | CALL(sys_sigprocmask) | 138 | CALL(sys_sigprocmask) |
@@ -146,7 +146,7 @@ | |||
146 | CALL(sys_bdflush) | 146 | CALL(sys_bdflush) |
147 | /* 135 */ CALL(sys_sysfs) | 147 | /* 135 */ CALL(sys_sysfs) |
148 | CALL(sys_personality) | 148 | CALL(sys_personality) |
149 | CALL(sys_ni_syscall) /* CALL(_sys_afs_syscall) */ | 149 | CALL(sys_ni_syscall) /* reserved for afs_syscall */ |
150 | CALL(sys_setfsuid16) | 150 | CALL(sys_setfsuid16) |
151 | CALL(sys_setfsgid16) | 151 | CALL(sys_setfsgid16) |
152 | /* 140 */ CALL(sys_llseek) | 152 | /* 140 */ CALL(sys_llseek) |
@@ -175,7 +175,7 @@ | |||
175 | CALL(sys_arm_mremap) | 175 | CALL(sys_arm_mremap) |
176 | CALL(sys_setresuid16) | 176 | CALL(sys_setresuid16) |
177 | /* 165 */ CALL(sys_getresuid16) | 177 | /* 165 */ CALL(sys_getresuid16) |
178 | CALL(sys_ni_syscall) | 178 | CALL(sys_ni_syscall) /* vm86 */ |
179 | CALL(sys_ni_syscall) /* was sys_query_module */ | 179 | CALL(sys_ni_syscall) /* was sys_query_module */ |
180 | CALL(sys_poll) | 180 | CALL(sys_poll) |
181 | CALL(sys_nfsservctl) | 181 | CALL(sys_nfsservctl) |
@@ -197,8 +197,8 @@ | |||
197 | /* 185 */ CALL(sys_capset) | 197 | /* 185 */ CALL(sys_capset) |
198 | CALL(sys_sigaltstack_wrapper) | 198 | CALL(sys_sigaltstack_wrapper) |
199 | CALL(sys_sendfile) | 199 | CALL(sys_sendfile) |
200 | CALL(sys_ni_syscall) | 200 | CALL(sys_ni_syscall) /* getpmsg */ |
201 | CALL(sys_ni_syscall) | 201 | CALL(sys_ni_syscall) /* putpmsg */ |
202 | /* 190 */ CALL(sys_vfork_wrapper) | 202 | /* 190 */ CALL(sys_vfork_wrapper) |
203 | CALL(sys_getrlimit) | 203 | CALL(sys_getrlimit) |
204 | CALL(sys_mmap2) | 204 | CALL(sys_mmap2) |
@@ -344,6 +344,18 @@ | |||
344 | CALL(sys_readlinkat) | 344 | CALL(sys_readlinkat) |
345 | CALL(sys_fchmodat) | 345 | CALL(sys_fchmodat) |
346 | CALL(sys_faccessat) | 346 | CALL(sys_faccessat) |
347 | /* 335 */ CALL(sys_ni_syscall) /* eventually pselect6 */ | ||
348 | CALL(sys_ni_syscall) /* eventually ppoll */ | ||
349 | CALL(sys_unshare) | ||
350 | CALL(sys_set_robust_list) | ||
351 | CALL(sys_get_robust_list) | ||
352 | /* 340 */ CALL(sys_splice) | ||
353 | CALL(sys_arm_sync_file_range) | ||
354 | CALL(sys_tee) | ||
355 | CALL(sys_vmsplice) | ||
356 | CALL(sys_move_pages) | ||
357 | /* 345 */ CALL(sys_getcpu) | ||
358 | CALL(sys_ni_syscall) /* eventually epoll_pwait */ | ||
347 | #ifndef syscalls_counted | 359 | #ifndef syscalls_counted |
348 | .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls | 360 | .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls |
349 | #define syscalls_counted | 361 | #define syscalls_counted |
diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c index 00c18d35913c..3d4fcbc16276 100644 --- a/arch/arm/kernel/sys_arm.c +++ b/arch/arm/kernel/sys_arm.c | |||
@@ -328,3 +328,16 @@ asmlinkage long sys_arm_fadvise64_64(int fd, int advice, | |||
328 | { | 328 | { |
329 | return sys_fadvise64_64(fd, offset, len, advice); | 329 | return sys_fadvise64_64(fd, offset, len, advice); |
330 | } | 330 | } |
331 | |||
332 | /* | ||
333 | * Yet more syscall fsckage - we can't fit sys_sync_file_range's | ||
334 | * arguments into the available registers with EABI. So, let's | ||
335 | * create an ARM specific syscall for this which has _sane_ | ||
336 | * arguments. (This incidentally also has an ABI-independent | ||
337 | * argument layout.) | ||
338 | */ | ||
339 | asmlinkage long sys_arm_sync_file_range(int fd, unsigned int flags, | ||
340 | loff_t offset, loff_t nbytes) | ||
341 | { | ||
342 | return sys_sync_file_range(fd, offset, nbytes, flags); | ||
343 | } | ||
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h index 32b06eb52819..97e7060000cf 100644 --- a/include/asm-arm/unistd.h +++ b/include/asm-arm/unistd.h | |||
@@ -360,6 +360,18 @@ | |||
360 | #define __NR_readlinkat (__NR_SYSCALL_BASE+332) | 360 | #define __NR_readlinkat (__NR_SYSCALL_BASE+332) |
361 | #define __NR_fchmodat (__NR_SYSCALL_BASE+333) | 361 | #define __NR_fchmodat (__NR_SYSCALL_BASE+333) |
362 | #define __NR_faccessat (__NR_SYSCALL_BASE+334) | 362 | #define __NR_faccessat (__NR_SYSCALL_BASE+334) |
363 | /* 335 for pselect6 */ | ||
364 | /* 336 for ppoll */ | ||
365 | #define __NR_unshare (__NR_SYSCALL_BASE+337) | ||
366 | #define __NR_set_robust_list (__NR_SYSCALL_BASE+338) | ||
367 | #define __NR_get_robust_list (__NR_SYSCALL_BASE+339) | ||
368 | #define __NR_splice (__NR_SYSCALL_BASE+340) | ||
369 | #define __NR_arm_sync_file_range (__NR_SYSCALL_BASE+341) | ||
370 | #define __NR_tee (__NR_SYSCALL_BASE+342) | ||
371 | #define __NR_vmsplice (__NR_SYSCALL_BASE+343) | ||
372 | #define __NR_move_pages (__NR_SYSCALL_BASE+344) | ||
373 | #define __NR_getcpu (__NR_SYSCALL_BASE+345) | ||
374 | /* 346 for epoll_pwait */ | ||
363 | 375 | ||
364 | /* | 376 | /* |
365 | * The following SWIs are ARM private. | 377 | * The following SWIs are ARM private. |