[ARM] Add more syscalls
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Sun, 17 Dec 2006 18:23:10 +0000 (18:23 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 17 Dec 2006 18:23:31 +0000 (18:23 +0000)
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>
arch/arm/kernel/calls.S
arch/arm/kernel/sys_arm.c
include/asm-arm/unistd.h

index e8f74363328ce6a40fb43084677cda482436284a..f7598cbc7ec5a788cf6f032a548372682f679feb 100644 (file)
                CALL(sys_ni_syscall)            /* was sys_profil */
                CALL(sys_statfs)
 /* 100 */      CALL(sys_fstatfs)
-               CALL(sys_ni_syscall)
+               CALL(sys_ni_syscall)            /* sys_ioperm */
                CALL(OBSOLETE(ABI(sys_socketcall, sys_oabi_socketcall)))
                CALL(sys_syslog)
                CALL(sys_setitimer)
 /* 120 */      CALL(sys_clone_wrapper)
                CALL(sys_setdomainname)
                CALL(sys_newuname)
-               CALL(sys_ni_syscall)
+               CALL(sys_ni_syscall)            /* modify_ldt */
                CALL(sys_adjtimex)
 /* 125 */      CALL(sys_mprotect)
                CALL(sys_sigprocmask)
                CALL(sys_bdflush)
 /* 135 */      CALL(sys_sysfs)
                CALL(sys_personality)
-               CALL(sys_ni_syscall)            /* CALL(_sys_afs_syscall) */
+               CALL(sys_ni_syscall)            /* reserved for afs_syscall */
                CALL(sys_setfsuid16)
                CALL(sys_setfsgid16)
 /* 140 */      CALL(sys_llseek)
                CALL(sys_arm_mremap)
                CALL(sys_setresuid16)
 /* 165 */      CALL(sys_getresuid16)
-               CALL(sys_ni_syscall)
+               CALL(sys_ni_syscall)            /* vm86 */
                CALL(sys_ni_syscall)            /* was sys_query_module */
                CALL(sys_poll)
                CALL(sys_nfsservctl)
 /* 185 */      CALL(sys_capset)
                CALL(sys_sigaltstack_wrapper)
                CALL(sys_sendfile)
-               CALL(sys_ni_syscall)
-               CALL(sys_ni_syscall)
+               CALL(sys_ni_syscall)            /* getpmsg */
+               CALL(sys_ni_syscall)            /* putpmsg */
 /* 190 */      CALL(sys_vfork_wrapper)
                CALL(sys_getrlimit)
                CALL(sys_mmap2)
                CALL(sys_readlinkat)
                CALL(sys_fchmodat)
                CALL(sys_faccessat)
+/* 335 */      CALL(sys_ni_syscall)            /* eventually pselect6 */
+               CALL(sys_ni_syscall)            /* eventually ppoll */
+               CALL(sys_unshare)
+               CALL(sys_set_robust_list)
+               CALL(sys_get_robust_list)
+/* 340 */      CALL(sys_splice)
+               CALL(sys_arm_sync_file_range)
+               CALL(sys_tee)
+               CALL(sys_vmsplice)
+               CALL(sys_move_pages)
+/* 345 */      CALL(sys_getcpu)
+               CALL(sys_ni_syscall)            /* eventually epoll_pwait */
 #ifndef syscalls_counted
 .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
 #define syscalls_counted
index 00c18d35913cb2c9a6da852fba86d67efa9fd5a4..3d4fcbc162769b9bf71f3da77b5488f15df5c50a 100644 (file)
@@ -328,3 +328,16 @@ asmlinkage long sys_arm_fadvise64_64(int fd, int advice,
 {
        return sys_fadvise64_64(fd, offset, len, advice);
 }
+
+/*
+ * Yet more syscall fsckage - we can't fit sys_sync_file_range's
+ * arguments into the available registers with EABI.  So, let's
+ * create an ARM specific syscall for this which has _sane_
+ * arguments.  (This incidentally also has an ABI-independent
+ * argument layout.)
+ */
+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);
+}
index 32b06eb5281949a1511d394fdd6fab8a87f3240b..97e7060000cf9170fe376bf689681ef2c1f303f7 100644 (file)
 #define __NR_readlinkat                        (__NR_SYSCALL_BASE+332)
 #define __NR_fchmodat                  (__NR_SYSCALL_BASE+333)
 #define __NR_faccessat                 (__NR_SYSCALL_BASE+334)
+                                       /* 335 for pselect6 */
+                                       /* 336 for ppoll */
+#define __NR_unshare                   (__NR_SYSCALL_BASE+337)
+#define __NR_set_robust_list           (__NR_SYSCALL_BASE+338)
+#define __NR_get_robust_list           (__NR_SYSCALL_BASE+339)
+#define __NR_splice                    (__NR_SYSCALL_BASE+340)
+#define __NR_arm_sync_file_range       (__NR_SYSCALL_BASE+341)
+#define __NR_tee                       (__NR_SYSCALL_BASE+342)
+#define __NR_vmsplice                  (__NR_SYSCALL_BASE+343)
+#define __NR_move_pages                        (__NR_SYSCALL_BASE+344)
+#define __NR_getcpu                    (__NR_SYSCALL_BASE+345)
+                                       /* 346 for epoll_pwait */
 
 /*
  * The following SWIs are ARM private.