2005-04-17 00:20:36 +02:00
|
|
|
/*
|
|
|
|
* linux/arch/arm/kernel/calls.S
|
|
|
|
*
|
|
|
|
* Copyright (C) 1995-2005 Russell King
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
2006-01-19 13:57:01 +01:00
|
|
|
* This file is included thrice in entry-common.S
|
2005-04-17 00:20:36 +02:00
|
|
|
*/
|
2006-01-19 13:57:01 +01:00
|
|
|
/* 0 */ CALL(sys_restart_syscall)
|
|
|
|
CALL(sys_exit)
|
|
|
|
CALL(sys_fork_wrapper)
|
|
|
|
CALL(sys_read)
|
|
|
|
CALL(sys_write)
|
|
|
|
/* 5 */ CALL(sys_open)
|
|
|
|
CALL(sys_close)
|
|
|
|
CALL(sys_ni_syscall) /* was sys_waitpid */
|
|
|
|
CALL(sys_creat)
|
|
|
|
CALL(sys_link)
|
|
|
|
/* 10 */ CALL(sys_unlink)
|
|
|
|
CALL(sys_execve_wrapper)
|
|
|
|
CALL(sys_chdir)
|
|
|
|
CALL(OBSOLETE(sys_time)) /* used by libc4 */
|
|
|
|
CALL(sys_mknod)
|
|
|
|
/* 15 */ CALL(sys_chmod)
|
|
|
|
CALL(sys_lchown16)
|
|
|
|
CALL(sys_ni_syscall) /* was sys_break */
|
|
|
|
CALL(sys_ni_syscall) /* was sys_stat */
|
|
|
|
CALL(sys_lseek)
|
|
|
|
/* 20 */ CALL(sys_getpid)
|
|
|
|
CALL(sys_mount)
|
|
|
|
CALL(OBSOLETE(sys_oldumount)) /* used by libc4 */
|
|
|
|
CALL(sys_setuid16)
|
|
|
|
CALL(sys_getuid16)
|
|
|
|
/* 25 */ CALL(OBSOLETE(sys_stime))
|
|
|
|
CALL(sys_ptrace)
|
|
|
|
CALL(OBSOLETE(sys_alarm)) /* used by libc4 */
|
|
|
|
CALL(sys_ni_syscall) /* was sys_fstat */
|
|
|
|
CALL(sys_pause)
|
|
|
|
/* 30 */ CALL(OBSOLETE(sys_utime)) /* used by libc4 */
|
|
|
|
CALL(sys_ni_syscall) /* was sys_stty */
|
|
|
|
CALL(sys_ni_syscall) /* was sys_getty */
|
|
|
|
CALL(sys_access)
|
|
|
|
CALL(sys_nice)
|
|
|
|
/* 35 */ CALL(sys_ni_syscall) /* was sys_ftime */
|
|
|
|
CALL(sys_sync)
|
|
|
|
CALL(sys_kill)
|
|
|
|
CALL(sys_rename)
|
|
|
|
CALL(sys_mkdir)
|
|
|
|
/* 40 */ CALL(sys_rmdir)
|
|
|
|
CALL(sys_dup)
|
|
|
|
CALL(sys_pipe)
|
|
|
|
CALL(sys_times)
|
|
|
|
CALL(sys_ni_syscall) /* was sys_prof */
|
|
|
|
/* 45 */ CALL(sys_brk)
|
|
|
|
CALL(sys_setgid16)
|
|
|
|
CALL(sys_getgid16)
|
|
|
|
CALL(sys_ni_syscall) /* was sys_signal */
|
|
|
|
CALL(sys_geteuid16)
|
|
|
|
/* 50 */ CALL(sys_getegid16)
|
|
|
|
CALL(sys_acct)
|
|
|
|
CALL(sys_umount)
|
|
|
|
CALL(sys_ni_syscall) /* was sys_lock */
|
|
|
|
CALL(sys_ioctl)
|
|
|
|
/* 55 */ CALL(sys_fcntl)
|
|
|
|
CALL(sys_ni_syscall) /* was sys_mpx */
|
|
|
|
CALL(sys_setpgid)
|
|
|
|
CALL(sys_ni_syscall) /* was sys_ulimit */
|
|
|
|
CALL(sys_ni_syscall) /* was sys_olduname */
|
|
|
|
/* 60 */ CALL(sys_umask)
|
|
|
|
CALL(sys_chroot)
|
|
|
|
CALL(sys_ustat)
|
|
|
|
CALL(sys_dup2)
|
|
|
|
CALL(sys_getppid)
|
|
|
|
/* 65 */ CALL(sys_getpgrp)
|
|
|
|
CALL(sys_setsid)
|
|
|
|
CALL(sys_sigaction)
|
|
|
|
CALL(sys_ni_syscall) /* was sys_sgetmask */
|
|
|
|
CALL(sys_ni_syscall) /* was sys_ssetmask */
|
|
|
|
/* 70 */ CALL(sys_setreuid16)
|
|
|
|
CALL(sys_setregid16)
|
ARM: 5677/1: ARM support for TIF_RESTORE_SIGMASK/pselect6/ppoll/epoll_pwait
This patch adds support for TIF_RESTORE_SIGMASK to ARM's
signal handling, which allows to hook up the pselect6, ppoll,
and epoll_pwait syscalls on ARM.
Tested here with eabi userspace and a test program with a
deliberate race between a child's exit and the parent's
sigprocmask/select sequence. Using sys_pselect6() instead
of sigprocmask/select reliably prevents the race.
The other arch's support for TIF_RESTORE_SIGMASK has evolved
over time:
In 2.6.16:
- add TIF_RESTORE_SIGMASK which parallels TIF_SIGPENDING
- test both when checking for pending signal [changed later]
- reimplement sys_sigsuspend() to use current->saved_sigmask,
TIF_RESTORE_SIGMASK [changed later], and -ERESTARTNOHAND;
ditto for sys_rt_sigsuspend(), but drop private code and
use common code via __ARCH_WANT_SYS_RT_SIGSUSPEND;
- there are now no "extra" calls to do_signal() so its oldset
parameter is always ¤t->blocked so need not be passed,
also its return value is changed to void
- change handle_signal() to return 0/-errno
- change do_signal() to honor TIF_RESTORE_SIGMASK:
+ get oldset from current->saved_sigmask if TIF_RESTORE_SIGMASK
is set
+ if handle_signal() was successful then clear TIF_RESTORE_SIGMASK
+ if no signal was delivered and TIF_RESTORE_SIGMASK is set then
clear it and restore the sigmask
- hook up sys_pselect6() and sys_ppoll()
In 2.6.19:
- hook up sys_epoll_pwait()
In 2.6.26:
- allow archs to override how TIF_RESTORE_SIGMASK is implemented;
default set_restore_sigmask() sets both TIF_RESTORE_SIGMASK and
TIF_SIGPENDING; archs need now just test TIF_SIGPENDING again
when checking for pending signal work; some archs now implement
TIF_RESTORE_SIGMASK as a secondary/non-atomic thread flag bit
- call set_restore_sigmask() in sys_sigsuspend() instead of setting
TIF_RESTORE_SIGMASK
In 2.6.29-rc:
- kill sys_pselect7() which no arch wanted
So for 2.6.31-rc6/ARM this patch does the following:
- Add TIF_RESTORE_SIGMASK. Use the generic set_restore_sigmask()
which sets both TIF_SIGPENDING and TIF_RESTORE_SIGMASK, so
TIF_RESTORE_SIGMASK need not claim one of the scarce low thread
flags, and existing TIF_SIGPENDING and _TIF_WORK_MASK tests need
not be extended for TIF_RESTORE_SIGMASK.
- sys_sigsuspend() is reimplemented to use current->saved_sigmask
and set_restore_sigmask(), making it identical to most other archs
- The private code for sys_rt_sigsuspend() is removed, instead
generic code supplies it via __ARCH_WANT_SYS_RT_SIGSUSPEND.
- sys_sigsuspend() and sys_rt_sigsuspend() no longer need a pt_regs
parameter, so their assembly code wrappers are removed.
- handle_signal() is changed to return 0 on success or -errno.
- The oldset parameter to do_signal() is now redundant and removed,
and the return value is now also redundant and changed to void.
- do_signal() is changed to honor TIF_RESTORE_SIGMASK:
+ get oldset from current->saved_sigmask if TIF_RESTORE_SIGMASK
is set
+ if handle_signal() was successful then clear TIF_RESTORE_SIGMASK
+ if no signal was delivered and TIF_RESTORE_SIGMASK is set then
clear it and restore the sigmask
- Hook up sys_pselect6, sys_ppoll, and sys_epoll_pwait.
Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-08-15 13:58:11 +02:00
|
|
|
CALL(sys_sigsuspend)
|
2006-01-19 13:57:01 +01:00
|
|
|
CALL(sys_sigpending)
|
|
|
|
CALL(sys_sethostname)
|
|
|
|
/* 75 */ CALL(sys_setrlimit)
|
|
|
|
CALL(OBSOLETE(sys_old_getrlimit)) /* used by libc4 */
|
|
|
|
CALL(sys_getrusage)
|
|
|
|
CALL(sys_gettimeofday)
|
|
|
|
CALL(sys_settimeofday)
|
|
|
|
/* 80 */ CALL(sys_getgroups16)
|
|
|
|
CALL(sys_setgroups16)
|
2010-03-11 00:21:13 +01:00
|
|
|
CALL(OBSOLETE(sys_old_select)) /* used by libc4 */
|
2006-01-19 13:57:01 +01:00
|
|
|
CALL(sys_symlink)
|
|
|
|
CALL(sys_ni_syscall) /* was sys_lstat */
|
|
|
|
/* 85 */ CALL(sys_readlink)
|
|
|
|
CALL(sys_uselib)
|
|
|
|
CALL(sys_swapon)
|
|
|
|
CALL(sys_reboot)
|
2009-01-14 14:13:55 +01:00
|
|
|
CALL(OBSOLETE(sys_old_readdir)) /* used by libc4 */
|
2010-03-11 00:21:15 +01:00
|
|
|
/* 90 */ CALL(OBSOLETE(sys_old_mmap)) /* used by libc4 */
|
2006-01-19 13:57:01 +01:00
|
|
|
CALL(sys_munmap)
|
|
|
|
CALL(sys_truncate)
|
|
|
|
CALL(sys_ftruncate)
|
|
|
|
CALL(sys_fchmod)
|
|
|
|
/* 95 */ CALL(sys_fchown16)
|
|
|
|
CALL(sys_getpriority)
|
|
|
|
CALL(sys_setpriority)
|
|
|
|
CALL(sys_ni_syscall) /* was sys_profil */
|
|
|
|
CALL(sys_statfs)
|
|
|
|
/* 100 */ CALL(sys_fstatfs)
|
2006-12-17 19:23:10 +01:00
|
|
|
CALL(sys_ni_syscall) /* sys_ioperm */
|
2006-02-16 23:36:13 +01:00
|
|
|
CALL(OBSOLETE(ABI(sys_socketcall, sys_oabi_socketcall)))
|
2006-01-19 13:57:01 +01:00
|
|
|
CALL(sys_syslog)
|
|
|
|
CALL(sys_setitimer)
|
|
|
|
/* 105 */ CALL(sys_getitimer)
|
|
|
|
CALL(sys_newstat)
|
|
|
|
CALL(sys_newlstat)
|
|
|
|
CALL(sys_newfstat)
|
|
|
|
CALL(sys_ni_syscall) /* was sys_uname */
|
|
|
|
/* 110 */ CALL(sys_ni_syscall) /* was sys_iopl */
|
|
|
|
CALL(sys_vhangup)
|
|
|
|
CALL(sys_ni_syscall)
|
|
|
|
CALL(OBSOLETE(sys_syscall)) /* call a syscall */
|
|
|
|
CALL(sys_wait4)
|
|
|
|
/* 115 */ CALL(sys_swapoff)
|
|
|
|
CALL(sys_sysinfo)
|
|
|
|
CALL(OBSOLETE(ABI(sys_ipc, sys_oabi_ipc)))
|
|
|
|
CALL(sys_fsync)
|
|
|
|
CALL(sys_sigreturn_wrapper)
|
|
|
|
/* 120 */ CALL(sys_clone_wrapper)
|
|
|
|
CALL(sys_setdomainname)
|
|
|
|
CALL(sys_newuname)
|
2006-12-17 19:23:10 +01:00
|
|
|
CALL(sys_ni_syscall) /* modify_ldt */
|
2006-01-19 13:57:01 +01:00
|
|
|
CALL(sys_adjtimex)
|
|
|
|
/* 125 */ CALL(sys_mprotect)
|
|
|
|
CALL(sys_sigprocmask)
|
|
|
|
CALL(sys_ni_syscall) /* was sys_create_module */
|
|
|
|
CALL(sys_init_module)
|
|
|
|
CALL(sys_delete_module)
|
|
|
|
/* 130 */ CALL(sys_ni_syscall) /* was sys_get_kernel_syms */
|
|
|
|
CALL(sys_quotactl)
|
|
|
|
CALL(sys_getpgid)
|
|
|
|
CALL(sys_fchdir)
|
|
|
|
CALL(sys_bdflush)
|
|
|
|
/* 135 */ CALL(sys_sysfs)
|
|
|
|
CALL(sys_personality)
|
2006-12-17 19:23:10 +01:00
|
|
|
CALL(sys_ni_syscall) /* reserved for afs_syscall */
|
2006-01-19 13:57:01 +01:00
|
|
|
CALL(sys_setfsuid16)
|
|
|
|
CALL(sys_setfsgid16)
|
|
|
|
/* 140 */ CALL(sys_llseek)
|
|
|
|
CALL(sys_getdents)
|
|
|
|
CALL(sys_select)
|
|
|
|
CALL(sys_flock)
|
|
|
|
CALL(sys_msync)
|
|
|
|
/* 145 */ CALL(sys_readv)
|
|
|
|
CALL(sys_writev)
|
|
|
|
CALL(sys_getsid)
|
|
|
|
CALL(sys_fdatasync)
|
|
|
|
CALL(sys_sysctl)
|
|
|
|
/* 150 */ CALL(sys_mlock)
|
|
|
|
CALL(sys_munlock)
|
|
|
|
CALL(sys_mlockall)
|
|
|
|
CALL(sys_munlockall)
|
|
|
|
CALL(sys_sched_setparam)
|
|
|
|
/* 155 */ CALL(sys_sched_getparam)
|
|
|
|
CALL(sys_sched_setscheduler)
|
|
|
|
CALL(sys_sched_getscheduler)
|
|
|
|
CALL(sys_sched_yield)
|
|
|
|
CALL(sys_sched_get_priority_max)
|
|
|
|
/* 160 */ CALL(sys_sched_get_priority_min)
|
|
|
|
CALL(sys_sched_rr_get_interval)
|
|
|
|
CALL(sys_nanosleep)
|
2009-11-30 19:06:51 +01:00
|
|
|
CALL(sys_mremap)
|
2006-01-19 13:57:01 +01:00
|
|
|
CALL(sys_setresuid16)
|
|
|
|
/* 165 */ CALL(sys_getresuid16)
|
2006-12-17 19:23:10 +01:00
|
|
|
CALL(sys_ni_syscall) /* vm86 */
|
2006-01-19 13:57:01 +01:00
|
|
|
CALL(sys_ni_syscall) /* was sys_query_module */
|
|
|
|
CALL(sys_poll)
|
2011-08-27 00:03:11 +02:00
|
|
|
CALL(sys_ni_syscall) /* was nfsservctl */
|
2006-01-19 13:57:01 +01:00
|
|
|
/* 170 */ CALL(sys_setresgid16)
|
|
|
|
CALL(sys_getresgid16)
|
|
|
|
CALL(sys_prctl)
|
|
|
|
CALL(sys_rt_sigreturn_wrapper)
|
|
|
|
CALL(sys_rt_sigaction)
|
|
|
|
/* 175 */ CALL(sys_rt_sigprocmask)
|
|
|
|
CALL(sys_rt_sigpending)
|
|
|
|
CALL(sys_rt_sigtimedwait)
|
|
|
|
CALL(sys_rt_sigqueueinfo)
|
ARM: 5677/1: ARM support for TIF_RESTORE_SIGMASK/pselect6/ppoll/epoll_pwait
This patch adds support for TIF_RESTORE_SIGMASK to ARM's
signal handling, which allows to hook up the pselect6, ppoll,
and epoll_pwait syscalls on ARM.
Tested here with eabi userspace and a test program with a
deliberate race between a child's exit and the parent's
sigprocmask/select sequence. Using sys_pselect6() instead
of sigprocmask/select reliably prevents the race.
The other arch's support for TIF_RESTORE_SIGMASK has evolved
over time:
In 2.6.16:
- add TIF_RESTORE_SIGMASK which parallels TIF_SIGPENDING
- test both when checking for pending signal [changed later]
- reimplement sys_sigsuspend() to use current->saved_sigmask,
TIF_RESTORE_SIGMASK [changed later], and -ERESTARTNOHAND;
ditto for sys_rt_sigsuspend(), but drop private code and
use common code via __ARCH_WANT_SYS_RT_SIGSUSPEND;
- there are now no "extra" calls to do_signal() so its oldset
parameter is always ¤t->blocked so need not be passed,
also its return value is changed to void
- change handle_signal() to return 0/-errno
- change do_signal() to honor TIF_RESTORE_SIGMASK:
+ get oldset from current->saved_sigmask if TIF_RESTORE_SIGMASK
is set
+ if handle_signal() was successful then clear TIF_RESTORE_SIGMASK
+ if no signal was delivered and TIF_RESTORE_SIGMASK is set then
clear it and restore the sigmask
- hook up sys_pselect6() and sys_ppoll()
In 2.6.19:
- hook up sys_epoll_pwait()
In 2.6.26:
- allow archs to override how TIF_RESTORE_SIGMASK is implemented;
default set_restore_sigmask() sets both TIF_RESTORE_SIGMASK and
TIF_SIGPENDING; archs need now just test TIF_SIGPENDING again
when checking for pending signal work; some archs now implement
TIF_RESTORE_SIGMASK as a secondary/non-atomic thread flag bit
- call set_restore_sigmask() in sys_sigsuspend() instead of setting
TIF_RESTORE_SIGMASK
In 2.6.29-rc:
- kill sys_pselect7() which no arch wanted
So for 2.6.31-rc6/ARM this patch does the following:
- Add TIF_RESTORE_SIGMASK. Use the generic set_restore_sigmask()
which sets both TIF_SIGPENDING and TIF_RESTORE_SIGMASK, so
TIF_RESTORE_SIGMASK need not claim one of the scarce low thread
flags, and existing TIF_SIGPENDING and _TIF_WORK_MASK tests need
not be extended for TIF_RESTORE_SIGMASK.
- sys_sigsuspend() is reimplemented to use current->saved_sigmask
and set_restore_sigmask(), making it identical to most other archs
- The private code for sys_rt_sigsuspend() is removed, instead
generic code supplies it via __ARCH_WANT_SYS_RT_SIGSUSPEND.
- sys_sigsuspend() and sys_rt_sigsuspend() no longer need a pt_regs
parameter, so their assembly code wrappers are removed.
- handle_signal() is changed to return 0 on success or -errno.
- The oldset parameter to do_signal() is now redundant and removed,
and the return value is now also redundant and changed to void.
- do_signal() is changed to honor TIF_RESTORE_SIGMASK:
+ get oldset from current->saved_sigmask if TIF_RESTORE_SIGMASK
is set
+ if handle_signal() was successful then clear TIF_RESTORE_SIGMASK
+ if no signal was delivered and TIF_RESTORE_SIGMASK is set then
clear it and restore the sigmask
- Hook up sys_pselect6, sys_ppoll, and sys_epoll_pwait.
Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-08-15 13:58:11 +02:00
|
|
|
CALL(sys_rt_sigsuspend)
|
2006-01-19 13:57:01 +01:00
|
|
|
/* 180 */ CALL(ABI(sys_pread64, sys_oabi_pread64))
|
|
|
|
CALL(ABI(sys_pwrite64, sys_oabi_pwrite64))
|
|
|
|
CALL(sys_chown16)
|
|
|
|
CALL(sys_getcwd)
|
|
|
|
CALL(sys_capget)
|
|
|
|
/* 185 */ CALL(sys_capset)
|
|
|
|
CALL(sys_sigaltstack_wrapper)
|
|
|
|
CALL(sys_sendfile)
|
2006-12-17 19:23:10 +01:00
|
|
|
CALL(sys_ni_syscall) /* getpmsg */
|
|
|
|
CALL(sys_ni_syscall) /* putpmsg */
|
2006-01-19 13:57:01 +01:00
|
|
|
/* 190 */ CALL(sys_vfork_wrapper)
|
|
|
|
CALL(sys_getrlimit)
|
|
|
|
CALL(sys_mmap2)
|
|
|
|
CALL(ABI(sys_truncate64, sys_oabi_truncate64))
|
|
|
|
CALL(ABI(sys_ftruncate64, sys_oabi_ftruncate64))
|
|
|
|
/* 195 */ CALL(ABI(sys_stat64, sys_oabi_stat64))
|
|
|
|
CALL(ABI(sys_lstat64, sys_oabi_lstat64))
|
|
|
|
CALL(ABI(sys_fstat64, sys_oabi_fstat64))
|
|
|
|
CALL(sys_lchown)
|
|
|
|
CALL(sys_getuid)
|
|
|
|
/* 200 */ CALL(sys_getgid)
|
|
|
|
CALL(sys_geteuid)
|
|
|
|
CALL(sys_getegid)
|
|
|
|
CALL(sys_setreuid)
|
|
|
|
CALL(sys_setregid)
|
|
|
|
/* 205 */ CALL(sys_getgroups)
|
|
|
|
CALL(sys_setgroups)
|
|
|
|
CALL(sys_fchown)
|
|
|
|
CALL(sys_setresuid)
|
|
|
|
CALL(sys_getresuid)
|
|
|
|
/* 210 */ CALL(sys_setresgid)
|
|
|
|
CALL(sys_getresgid)
|
|
|
|
CALL(sys_chown)
|
|
|
|
CALL(sys_setuid)
|
|
|
|
CALL(sys_setgid)
|
|
|
|
/* 215 */ CALL(sys_setfsuid)
|
|
|
|
CALL(sys_setfsgid)
|
|
|
|
CALL(sys_getdents64)
|
|
|
|
CALL(sys_pivot_root)
|
|
|
|
CALL(sys_mincore)
|
|
|
|
/* 220 */ CALL(sys_madvise)
|
|
|
|
CALL(ABI(sys_fcntl64, sys_oabi_fcntl64))
|
|
|
|
CALL(sys_ni_syscall) /* TUX */
|
|
|
|
CALL(sys_ni_syscall)
|
|
|
|
CALL(sys_gettid)
|
|
|
|
/* 225 */ CALL(ABI(sys_readahead, sys_oabi_readahead))
|
|
|
|
CALL(sys_setxattr)
|
|
|
|
CALL(sys_lsetxattr)
|
|
|
|
CALL(sys_fsetxattr)
|
|
|
|
CALL(sys_getxattr)
|
|
|
|
/* 230 */ CALL(sys_lgetxattr)
|
|
|
|
CALL(sys_fgetxattr)
|
|
|
|
CALL(sys_listxattr)
|
|
|
|
CALL(sys_llistxattr)
|
|
|
|
CALL(sys_flistxattr)
|
|
|
|
/* 235 */ CALL(sys_removexattr)
|
|
|
|
CALL(sys_lremovexattr)
|
|
|
|
CALL(sys_fremovexattr)
|
|
|
|
CALL(sys_tkill)
|
|
|
|
CALL(sys_sendfile64)
|
|
|
|
/* 240 */ CALL(sys_futex)
|
|
|
|
CALL(sys_sched_setaffinity)
|
|
|
|
CALL(sys_sched_getaffinity)
|
|
|
|
CALL(sys_io_setup)
|
|
|
|
CALL(sys_io_destroy)
|
|
|
|
/* 245 */ CALL(sys_io_getevents)
|
|
|
|
CALL(sys_io_submit)
|
|
|
|
CALL(sys_io_cancel)
|
|
|
|
CALL(sys_exit_group)
|
|
|
|
CALL(sys_lookup_dcookie)
|
|
|
|
/* 250 */ CALL(sys_epoll_create)
|
|
|
|
CALL(ABI(sys_epoll_ctl, sys_oabi_epoll_ctl))
|
|
|
|
CALL(ABI(sys_epoll_wait, sys_oabi_epoll_wait))
|
2008-08-12 12:15:02 +02:00
|
|
|
CALL(sys_remap_file_pages)
|
2006-01-19 13:57:01 +01:00
|
|
|
CALL(sys_ni_syscall) /* sys_set_thread_area */
|
|
|
|
/* 255 */ CALL(sys_ni_syscall) /* sys_get_thread_area */
|
2008-08-12 12:15:02 +02:00
|
|
|
CALL(sys_set_tid_address)
|
2006-01-19 13:57:01 +01:00
|
|
|
CALL(sys_timer_create)
|
|
|
|
CALL(sys_timer_settime)
|
|
|
|
CALL(sys_timer_gettime)
|
|
|
|
/* 260 */ CALL(sys_timer_getoverrun)
|
|
|
|
CALL(sys_timer_delete)
|
|
|
|
CALL(sys_clock_settime)
|
|
|
|
CALL(sys_clock_gettime)
|
|
|
|
CALL(sys_clock_getres)
|
|
|
|
/* 265 */ CALL(sys_clock_nanosleep)
|
|
|
|
CALL(sys_statfs64_wrapper)
|
|
|
|
CALL(sys_fstatfs64_wrapper)
|
|
|
|
CALL(sys_tgkill)
|
|
|
|
CALL(sys_utimes)
|
|
|
|
/* 270 */ CALL(sys_arm_fadvise64_64)
|
|
|
|
CALL(sys_pciconfig_iobase)
|
|
|
|
CALL(sys_pciconfig_read)
|
|
|
|
CALL(sys_pciconfig_write)
|
|
|
|
CALL(sys_mq_open)
|
|
|
|
/* 275 */ CALL(sys_mq_unlink)
|
|
|
|
CALL(sys_mq_timedsend)
|
|
|
|
CALL(sys_mq_timedreceive)
|
|
|
|
CALL(sys_mq_notify)
|
|
|
|
CALL(sys_mq_getsetattr)
|
|
|
|
/* 280 */ CALL(sys_waitid)
|
|
|
|
CALL(sys_socket)
|
2006-02-08 22:19:36 +01:00
|
|
|
CALL(ABI(sys_bind, sys_oabi_bind))
|
|
|
|
CALL(ABI(sys_connect, sys_oabi_connect))
|
2006-01-19 13:57:01 +01:00
|
|
|
CALL(sys_listen)
|
|
|
|
/* 285 */ CALL(sys_accept)
|
|
|
|
CALL(sys_getsockname)
|
|
|
|
CALL(sys_getpeername)
|
|
|
|
CALL(sys_socketpair)
|
|
|
|
CALL(sys_send)
|
2006-02-08 22:19:36 +01:00
|
|
|
/* 290 */ CALL(ABI(sys_sendto, sys_oabi_sendto))
|
2006-01-19 13:57:01 +01:00
|
|
|
CALL(sys_recv)
|
|
|
|
CALL(sys_recvfrom)
|
|
|
|
CALL(sys_shutdown)
|
|
|
|
CALL(sys_setsockopt)
|
|
|
|
/* 295 */ CALL(sys_getsockopt)
|
2006-02-08 22:19:36 +01:00
|
|
|
CALL(ABI(sys_sendmsg, sys_oabi_sendmsg))
|
2006-01-19 13:57:01 +01:00
|
|
|
CALL(sys_recvmsg)
|
|
|
|
CALL(ABI(sys_semop, sys_oabi_semop))
|
|
|
|
CALL(sys_semget)
|
|
|
|
/* 300 */ CALL(sys_semctl)
|
|
|
|
CALL(sys_msgsnd)
|
|
|
|
CALL(sys_msgrcv)
|
|
|
|
CALL(sys_msgget)
|
|
|
|
CALL(sys_msgctl)
|
|
|
|
/* 305 */ CALL(sys_shmat)
|
|
|
|
CALL(sys_shmdt)
|
|
|
|
CALL(sys_shmget)
|
|
|
|
CALL(sys_shmctl)
|
|
|
|
CALL(sys_add_key)
|
|
|
|
/* 310 */ CALL(sys_request_key)
|
|
|
|
CALL(sys_keyctl)
|
|
|
|
CALL(ABI(sys_semtimedop, sys_oabi_semtimedop))
|
|
|
|
/* vserver */ CALL(sys_ni_syscall)
|
|
|
|
CALL(sys_ioprio_set)
|
|
|
|
/* 315 */ CALL(sys_ioprio_get)
|
|
|
|
CALL(sys_inotify_init)
|
|
|
|
CALL(sys_inotify_add_watch)
|
|
|
|
CALL(sys_inotify_rm_watch)
|
|
|
|
CALL(sys_mbind)
|
|
|
|
/* 320 */ CALL(sys_get_mempolicy)
|
|
|
|
CALL(sys_set_mempolicy)
|
2006-12-09 17:41:55 +01:00
|
|
|
CALL(sys_openat)
|
|
|
|
CALL(sys_mkdirat)
|
|
|
|
CALL(sys_mknodat)
|
|
|
|
/* 325 */ CALL(sys_fchownat)
|
|
|
|
CALL(sys_futimesat)
|
2008-03-28 13:08:09 +01:00
|
|
|
CALL(ABI(sys_fstatat64, sys_oabi_fstatat64))
|
2006-12-09 17:41:55 +01:00
|
|
|
CALL(sys_unlinkat)
|
|
|
|
CALL(sys_renameat)
|
|
|
|
/* 330 */ CALL(sys_linkat)
|
|
|
|
CALL(sys_symlinkat)
|
|
|
|
CALL(sys_readlinkat)
|
|
|
|
CALL(sys_fchmodat)
|
|
|
|
CALL(sys_faccessat)
|
ARM: 5677/1: ARM support for TIF_RESTORE_SIGMASK/pselect6/ppoll/epoll_pwait
This patch adds support for TIF_RESTORE_SIGMASK to ARM's
signal handling, which allows to hook up the pselect6, ppoll,
and epoll_pwait syscalls on ARM.
Tested here with eabi userspace and a test program with a
deliberate race between a child's exit and the parent's
sigprocmask/select sequence. Using sys_pselect6() instead
of sigprocmask/select reliably prevents the race.
The other arch's support for TIF_RESTORE_SIGMASK has evolved
over time:
In 2.6.16:
- add TIF_RESTORE_SIGMASK which parallels TIF_SIGPENDING
- test both when checking for pending signal [changed later]
- reimplement sys_sigsuspend() to use current->saved_sigmask,
TIF_RESTORE_SIGMASK [changed later], and -ERESTARTNOHAND;
ditto for sys_rt_sigsuspend(), but drop private code and
use common code via __ARCH_WANT_SYS_RT_SIGSUSPEND;
- there are now no "extra" calls to do_signal() so its oldset
parameter is always ¤t->blocked so need not be passed,
also its return value is changed to void
- change handle_signal() to return 0/-errno
- change do_signal() to honor TIF_RESTORE_SIGMASK:
+ get oldset from current->saved_sigmask if TIF_RESTORE_SIGMASK
is set
+ if handle_signal() was successful then clear TIF_RESTORE_SIGMASK
+ if no signal was delivered and TIF_RESTORE_SIGMASK is set then
clear it and restore the sigmask
- hook up sys_pselect6() and sys_ppoll()
In 2.6.19:
- hook up sys_epoll_pwait()
In 2.6.26:
- allow archs to override how TIF_RESTORE_SIGMASK is implemented;
default set_restore_sigmask() sets both TIF_RESTORE_SIGMASK and
TIF_SIGPENDING; archs need now just test TIF_SIGPENDING again
when checking for pending signal work; some archs now implement
TIF_RESTORE_SIGMASK as a secondary/non-atomic thread flag bit
- call set_restore_sigmask() in sys_sigsuspend() instead of setting
TIF_RESTORE_SIGMASK
In 2.6.29-rc:
- kill sys_pselect7() which no arch wanted
So for 2.6.31-rc6/ARM this patch does the following:
- Add TIF_RESTORE_SIGMASK. Use the generic set_restore_sigmask()
which sets both TIF_SIGPENDING and TIF_RESTORE_SIGMASK, so
TIF_RESTORE_SIGMASK need not claim one of the scarce low thread
flags, and existing TIF_SIGPENDING and _TIF_WORK_MASK tests need
not be extended for TIF_RESTORE_SIGMASK.
- sys_sigsuspend() is reimplemented to use current->saved_sigmask
and set_restore_sigmask(), making it identical to most other archs
- The private code for sys_rt_sigsuspend() is removed, instead
generic code supplies it via __ARCH_WANT_SYS_RT_SIGSUSPEND.
- sys_sigsuspend() and sys_rt_sigsuspend() no longer need a pt_regs
parameter, so their assembly code wrappers are removed.
- handle_signal() is changed to return 0 on success or -errno.
- The oldset parameter to do_signal() is now redundant and removed,
and the return value is now also redundant and changed to void.
- do_signal() is changed to honor TIF_RESTORE_SIGMASK:
+ get oldset from current->saved_sigmask if TIF_RESTORE_SIGMASK
is set
+ if handle_signal() was successful then clear TIF_RESTORE_SIGMASK
+ if no signal was delivered and TIF_RESTORE_SIGMASK is set then
clear it and restore the sigmask
- Hook up sys_pselect6, sys_ppoll, and sys_epoll_pwait.
Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-08-15 13:58:11 +02:00
|
|
|
/* 335 */ CALL(sys_pselect6)
|
|
|
|
CALL(sys_ppoll)
|
2006-12-17 19:23:10 +01:00
|
|
|
CALL(sys_unshare)
|
|
|
|
CALL(sys_set_robust_list)
|
|
|
|
CALL(sys_get_robust_list)
|
|
|
|
/* 340 */ CALL(sys_splice)
|
Introduce fixed sys_sync_file_range2() syscall, implement on PowerPC and ARM
Not all the world is an i386. Many architectures need 64-bit arguments to be
aligned in suitable pairs of registers, and the original
sys_sync_file_range(int, loff_t, loff_t, int) was therefore wasting an
argument register for padding after the first integer. Since we don't
normally have more than 6 arguments for system calls, that left no room for
the final argument on some architectures.
Fix this by introducing sys_sync_file_range2(int, int, loff_t, loff_t) which
all fits nicely. In fact, ARM already had that, but called it
sys_arm_sync_file_range. Move it to fs/sync.c and rename it, then implement
the needed compatibility routine. And stop the missing syscall check from
bitching about the absence of sys_sync_file_range() if we've implemented
sys_sync_file_range2() instead.
Tested on PPC32 and with 32-bit and 64-bit userspace on PPC64.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-27 23:10:09 +02:00
|
|
|
CALL(sys_sync_file_range2)
|
2006-12-17 19:23:10 +01:00
|
|
|
CALL(sys_tee)
|
|
|
|
CALL(sys_vmsplice)
|
|
|
|
CALL(sys_move_pages)
|
|
|
|
/* 345 */ CALL(sys_getcpu)
|
ARM: 5677/1: ARM support for TIF_RESTORE_SIGMASK/pselect6/ppoll/epoll_pwait
This patch adds support for TIF_RESTORE_SIGMASK to ARM's
signal handling, which allows to hook up the pselect6, ppoll,
and epoll_pwait syscalls on ARM.
Tested here with eabi userspace and a test program with a
deliberate race between a child's exit and the parent's
sigprocmask/select sequence. Using sys_pselect6() instead
of sigprocmask/select reliably prevents the race.
The other arch's support for TIF_RESTORE_SIGMASK has evolved
over time:
In 2.6.16:
- add TIF_RESTORE_SIGMASK which parallels TIF_SIGPENDING
- test both when checking for pending signal [changed later]
- reimplement sys_sigsuspend() to use current->saved_sigmask,
TIF_RESTORE_SIGMASK [changed later], and -ERESTARTNOHAND;
ditto for sys_rt_sigsuspend(), but drop private code and
use common code via __ARCH_WANT_SYS_RT_SIGSUSPEND;
- there are now no "extra" calls to do_signal() so its oldset
parameter is always ¤t->blocked so need not be passed,
also its return value is changed to void
- change handle_signal() to return 0/-errno
- change do_signal() to honor TIF_RESTORE_SIGMASK:
+ get oldset from current->saved_sigmask if TIF_RESTORE_SIGMASK
is set
+ if handle_signal() was successful then clear TIF_RESTORE_SIGMASK
+ if no signal was delivered and TIF_RESTORE_SIGMASK is set then
clear it and restore the sigmask
- hook up sys_pselect6() and sys_ppoll()
In 2.6.19:
- hook up sys_epoll_pwait()
In 2.6.26:
- allow archs to override how TIF_RESTORE_SIGMASK is implemented;
default set_restore_sigmask() sets both TIF_RESTORE_SIGMASK and
TIF_SIGPENDING; archs need now just test TIF_SIGPENDING again
when checking for pending signal work; some archs now implement
TIF_RESTORE_SIGMASK as a secondary/non-atomic thread flag bit
- call set_restore_sigmask() in sys_sigsuspend() instead of setting
TIF_RESTORE_SIGMASK
In 2.6.29-rc:
- kill sys_pselect7() which no arch wanted
So for 2.6.31-rc6/ARM this patch does the following:
- Add TIF_RESTORE_SIGMASK. Use the generic set_restore_sigmask()
which sets both TIF_SIGPENDING and TIF_RESTORE_SIGMASK, so
TIF_RESTORE_SIGMASK need not claim one of the scarce low thread
flags, and existing TIF_SIGPENDING and _TIF_WORK_MASK tests need
not be extended for TIF_RESTORE_SIGMASK.
- sys_sigsuspend() is reimplemented to use current->saved_sigmask
and set_restore_sigmask(), making it identical to most other archs
- The private code for sys_rt_sigsuspend() is removed, instead
generic code supplies it via __ARCH_WANT_SYS_RT_SIGSUSPEND.
- sys_sigsuspend() and sys_rt_sigsuspend() no longer need a pt_regs
parameter, so their assembly code wrappers are removed.
- handle_signal() is changed to return 0 on success or -errno.
- The oldset parameter to do_signal() is now redundant and removed,
and the return value is now also redundant and changed to void.
- do_signal() is changed to honor TIF_RESTORE_SIGMASK:
+ get oldset from current->saved_sigmask if TIF_RESTORE_SIGMASK
is set
+ if handle_signal() was successful then clear TIF_RESTORE_SIGMASK
+ if no signal was delivered and TIF_RESTORE_SIGMASK is set then
clear it and restore the sigmask
- Hook up sys_pselect6, sys_ppoll, and sys_epoll_pwait.
Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2009-08-15 13:58:11 +02:00
|
|
|
CALL(sys_epoll_pwait)
|
2007-02-06 21:29:00 +01:00
|
|
|
CALL(sys_kexec_load)
|
2007-05-16 13:41:15 +02:00
|
|
|
CALL(sys_utimensat)
|
|
|
|
CALL(sys_signalfd)
|
2008-03-06 16:22:00 +01:00
|
|
|
/* 350 */ CALL(sys_timerfd_create)
|
2007-05-16 13:41:15 +02:00
|
|
|
CALL(sys_eventfd)
|
2007-09-30 18:37:24 +02:00
|
|
|
CALL(sys_fallocate)
|
2008-03-06 16:22:00 +01:00
|
|
|
CALL(sys_timerfd_settime)
|
|
|
|
CALL(sys_timerfd_gettime)
|
2008-08-12 12:15:02 +02:00
|
|
|
/* 355 */ CALL(sys_signalfd4)
|
|
|
|
CALL(sys_eventfd2)
|
|
|
|
CALL(sys_epoll_create1)
|
|
|
|
CALL(sys_dup3)
|
|
|
|
CALL(sys_pipe2)
|
|
|
|
/* 360 */ CALL(sys_inotify_init1)
|
2009-04-18 22:26:57 +02:00
|
|
|
CALL(sys_preadv)
|
|
|
|
CALL(sys_pwritev)
|
2009-06-20 23:25:45 +02:00
|
|
|
CALL(sys_rt_tgsigqueueinfo)
|
perf: Do the big rename: Performance Counters -> Performance Events
Bye-bye Performance Counters, welcome Performance Events!
In the past few months the perfcounters subsystem has grown out its
initial role of counting hardware events, and has become (and is
becoming) a much broader generic event enumeration, reporting, logging,
monitoring, analysis facility.
Naming its core object 'perf_counter' and naming the subsystem
'perfcounters' has become more and more of a misnomer. With pending
code like hw-breakpoints support the 'counter' name is less and
less appropriate.
All in one, we've decided to rename the subsystem to 'performance
events' and to propagate this rename through all fields, variables
and API names. (in an ABI compatible fashion)
The word 'event' is also a bit shorter than 'counter' - which makes
it slightly more convenient to write/handle as well.
Thanks goes to Stephane Eranian who first observed this misnomer and
suggested a rename.
User-space tooling and ABI compatibility is not affected - this patch
should be function-invariant. (Also, defconfigs were not touched to
keep the size down.)
This patch has been generated via the following script:
FILES=$(find * -type f | grep -vE 'oprofile|[^K]config')
sed -i \
-e 's/PERF_EVENT_/PERF_RECORD_/g' \
-e 's/PERF_COUNTER/PERF_EVENT/g' \
-e 's/perf_counter/perf_event/g' \
-e 's/nb_counters/nb_events/g' \
-e 's/swcounter/swevent/g' \
-e 's/tpcounter_event/tp_event/g' \
$FILES
for N in $(find . -name perf_counter.[ch]); do
M=$(echo $N | sed 's/perf_counter/perf_event/g')
mv $N $M
done
FILES=$(find . -name perf_event.*)
sed -i \
-e 's/COUNTER_MASK/REG_MASK/g' \
-e 's/COUNTER/EVENT/g' \
-e 's/\<event\>/event_id/g' \
-e 's/counter/event/g' \
-e 's/Counter/Event/g' \
$FILES
... to keep it as correct as possible. This script can also be
used by anyone who has pending perfcounters patches - it converts
a Linux kernel tree over to the new naming. We tried to time this
change to the point in time where the amount of pending patches
is the smallest: the end of the merge window.
Namespace clashes were fixed up in a preparatory patch - and some
stylistic fallout will be fixed up in a subsequent patch.
( NOTE: 'counters' are still the proper terminology when we deal
with hardware registers - and these sed scripts are a bit
over-eager in renaming them. I've undone some of that, but
in case there's something left where 'counter' would be
better than 'event' we can undo that on an individual basis
instead of touching an otherwise nicely automated patch. )
Suggested-by: Stephane Eranian <eranian@google.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Paul Mackerras <paulus@samba.org>
Reviewed-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: <linux-arch@vger.kernel.org>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-09-21 12:02:48 +02:00
|
|
|
CALL(sys_perf_event_open)
|
2009-10-13 08:40:10 +02:00
|
|
|
/* 365 */ CALL(sys_recvmmsg)
|
2010-08-15 11:47:23 +02:00
|
|
|
CALL(sys_accept4)
|
2010-08-25 21:49:01 +02:00
|
|
|
CALL(sys_fanotify_init)
|
|
|
|
CALL(sys_fanotify_mark)
|
|
|
|
CALL(sys_prlimit64)
|
2011-04-15 14:26:40 +02:00
|
|
|
/* 370 */ CALL(sys_name_to_handle_at)
|
|
|
|
CALL(sys_open_by_handle_at)
|
|
|
|
CALL(sys_clock_adjtime)
|
|
|
|
CALL(sys_syncfs)
|
2011-05-26 13:12:13 +02:00
|
|
|
CALL(sys_sendmmsg)
|
2011-05-28 19:51:01 +02:00
|
|
|
/* 375 */ CALL(sys_setns)
|
2011-11-17 17:58:00 +01:00
|
|
|
CALL(sys_process_vm_readv)
|
|
|
|
CALL(sys_process_vm_writev)
|
2006-01-19 13:57:01 +01:00
|
|
|
#ifndef syscalls_counted
|
|
|
|
.equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls
|
|
|
|
#define syscalls_counted
|
2005-04-17 00:20:36 +02:00
|
|
|
#endif
|
2006-01-19 13:57:01 +01:00
|
|
|
.rept syscalls_padding
|
|
|
|
CALL(sys_ni_syscall)
|
|
|
|
.endr
|