2006-06-20 03:45:04 +07:00
|
|
|
/*
|
|
|
|
* List of powerpc syscalls. For the meaning of the _SPU suffix see
|
|
|
|
* arch/powerpc/platforms/cell/spu_callbacks.c
|
|
|
|
*/
|
|
|
|
|
|
|
|
SYSCALL(restart_syscall)
|
|
|
|
SYSCALL(exit)
|
|
|
|
PPC_SYS(fork)
|
|
|
|
SYSCALL_SPU(read)
|
|
|
|
SYSCALL_SPU(write)
|
|
|
|
COMPAT_SYS_SPU(open)
|
|
|
|
SYSCALL_SPU(close)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL_SPU(waitpid)
|
|
|
|
SYSCALL_SPU(creat)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL_SPU(link)
|
|
|
|
SYSCALL_SPU(unlink)
|
|
|
|
COMPAT_SYS(execve)
|
|
|
|
SYSCALL_SPU(chdir)
|
|
|
|
COMPAT_SYS_SPU(time)
|
|
|
|
SYSCALL_SPU(mknod)
|
|
|
|
SYSCALL_SPU(chmod)
|
|
|
|
SYSCALL_SPU(lchown)
|
|
|
|
SYSCALL(ni_syscall)
|
|
|
|
OLDSYS(stat)
|
2013-02-24 22:52:26 +07:00
|
|
|
COMPAT_SYS_SPU(lseek)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL_SPU(getpid)
|
|
|
|
COMPAT_SYS(mount)
|
|
|
|
SYSX(sys_ni_syscall,sys_oldumount,sys_oldumount)
|
|
|
|
SYSCALL_SPU(setuid)
|
|
|
|
SYSCALL_SPU(getuid)
|
|
|
|
COMPAT_SYS_SPU(stime)
|
|
|
|
COMPAT_SYS(ptrace)
|
|
|
|
SYSCALL_SPU(alarm)
|
|
|
|
OLDSYS(fstat)
|
2008-09-01 08:23:30 +07:00
|
|
|
SYSCALL(pause)
|
2006-06-20 03:45:04 +07:00
|
|
|
COMPAT_SYS(utime)
|
|
|
|
SYSCALL(ni_syscall)
|
|
|
|
SYSCALL(ni_syscall)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL_SPU(access)
|
|
|
|
SYSCALL_SPU(nice)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL(ni_syscall)
|
|
|
|
SYSCALL_SPU(sync)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL_SPU(kill)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL_SPU(rename)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL_SPU(mkdir)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL_SPU(rmdir)
|
|
|
|
SYSCALL_SPU(dup)
|
|
|
|
SYSCALL_SPU(pipe)
|
|
|
|
COMPAT_SYS_SPU(times)
|
|
|
|
SYSCALL(ni_syscall)
|
|
|
|
SYSCALL_SPU(brk)
|
|
|
|
SYSCALL_SPU(setgid)
|
|
|
|
SYSCALL_SPU(getgid)
|
|
|
|
SYSCALL(signal)
|
|
|
|
SYSCALL_SPU(geteuid)
|
|
|
|
SYSCALL_SPU(getegid)
|
|
|
|
SYSCALL(acct)
|
|
|
|
SYSCALL(umount)
|
|
|
|
SYSCALL(ni_syscall)
|
|
|
|
COMPAT_SYS_SPU(ioctl)
|
|
|
|
COMPAT_SYS_SPU(fcntl)
|
|
|
|
SYSCALL(ni_syscall)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL_SPU(setpgid)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL(ni_syscall)
|
|
|
|
SYSX(sys_ni_syscall,sys_olduname, sys_olduname)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL_SPU(umask)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL_SPU(chroot)
|
2008-11-28 16:09:09 +07:00
|
|
|
COMPAT_SYS(ustat)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL_SPU(dup2)
|
|
|
|
SYSCALL_SPU(getppid)
|
|
|
|
SYSCALL_SPU(getpgrp)
|
|
|
|
SYSCALL_SPU(setsid)
|
|
|
|
SYS32ONLY(sigaction)
|
|
|
|
SYSCALL_SPU(sgetmask)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL_SPU(ssetmask)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL_SPU(setreuid)
|
|
|
|
SYSCALL_SPU(setregid)
|
2012-12-26 04:23:09 +07:00
|
|
|
#define compat_sys_sigsuspend sys_sigsuspend
|
2006-06-20 03:45:04 +07:00
|
|
|
SYS32ONLY(sigsuspend)
|
|
|
|
COMPAT_SYS(sigpending)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL_SPU(sethostname)
|
2006-06-20 03:45:04 +07:00
|
|
|
COMPAT_SYS_SPU(setrlimit)
|
|
|
|
COMPAT_SYS(old_getrlimit)
|
|
|
|
COMPAT_SYS_SPU(getrusage)
|
|
|
|
COMPAT_SYS_SPU(gettimeofday)
|
|
|
|
COMPAT_SYS_SPU(settimeofday)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL_SPU(getgroups)
|
|
|
|
SYSCALL_SPU(setgroups)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSX(sys_ni_syscall,sys_ni_syscall,ppc_select)
|
|
|
|
SYSCALL_SPU(symlink)
|
|
|
|
OLDSYS(lstat)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL_SPU(readlink)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL(uselib)
|
|
|
|
SYSCALL(swapon)
|
|
|
|
SYSCALL(reboot)
|
2009-01-14 20:13:55 +07:00
|
|
|
SYSX(sys_ni_syscall,compat_sys_old_readdir,sys_old_readdir)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL_SPU(mmap)
|
|
|
|
SYSCALL_SPU(munmap)
|
2009-07-28 08:54:32 +07:00
|
|
|
COMPAT_SYS_SPU(truncate)
|
|
|
|
COMPAT_SYS_SPU(ftruncate)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL_SPU(fchmod)
|
|
|
|
SYSCALL_SPU(fchown)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL_SPU(getpriority)
|
|
|
|
SYSCALL_SPU(setpriority)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL(ni_syscall)
|
|
|
|
COMPAT_SYS(statfs)
|
|
|
|
COMPAT_SYS(fstatfs)
|
|
|
|
SYSCALL(ni_syscall)
|
|
|
|
COMPAT_SYS_SPU(socketcall)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL_SPU(syslog)
|
2006-06-20 03:45:04 +07:00
|
|
|
COMPAT_SYS_SPU(setitimer)
|
|
|
|
COMPAT_SYS_SPU(getitimer)
|
|
|
|
COMPAT_SYS_SPU(newstat)
|
|
|
|
COMPAT_SYS_SPU(newlstat)
|
|
|
|
COMPAT_SYS_SPU(newfstat)
|
|
|
|
SYSX(sys_ni_syscall,sys_uname,sys_uname)
|
|
|
|
SYSCALL(ni_syscall)
|
|
|
|
SYSCALL_SPU(vhangup)
|
|
|
|
SYSCALL(ni_syscall)
|
|
|
|
SYSCALL(ni_syscall)
|
|
|
|
COMPAT_SYS_SPU(wait4)
|
|
|
|
SYSCALL(swapoff)
|
|
|
|
COMPAT_SYS_SPU(sysinfo)
|
|
|
|
COMPAT_SYS(ipc)
|
|
|
|
SYSCALL_SPU(fsync)
|
|
|
|
SYS32ONLY(sigreturn)
|
|
|
|
PPC_SYS(clone)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL_SPU(setdomainname)
|
2010-03-11 06:21:19 +07:00
|
|
|
SYSCALL_SPU(newuname)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL(ni_syscall)
|
|
|
|
COMPAT_SYS_SPU(adjtimex)
|
|
|
|
SYSCALL_SPU(mprotect)
|
|
|
|
SYSX(sys_ni_syscall,compat_sys_sigprocmask,sys_sigprocmask)
|
|
|
|
SYSCALL(ni_syscall)
|
|
|
|
SYSCALL(init_module)
|
|
|
|
SYSCALL(delete_module)
|
|
|
|
SYSCALL(ni_syscall)
|
|
|
|
SYSCALL(quotactl)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL_SPU(getpgid)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL_SPU(fchdir)
|
|
|
|
SYSCALL_SPU(bdflush)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL_SPU(sysfs)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSX_SPU(ppc64_personality,ppc64_personality,sys_personality)
|
|
|
|
SYSCALL(ni_syscall)
|
|
|
|
SYSCALL_SPU(setfsuid)
|
|
|
|
SYSCALL_SPU(setfsgid)
|
|
|
|
SYSCALL_SPU(llseek)
|
|
|
|
COMPAT_SYS_SPU(getdents)
|
2009-11-23 10:25:06 +07:00
|
|
|
SYSX_SPU(sys_select,ppc32_select,sys_select)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL_SPU(flock)
|
|
|
|
SYSCALL_SPU(msync)
|
|
|
|
COMPAT_SYS_SPU(readv)
|
|
|
|
COMPAT_SYS_SPU(writev)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL_SPU(getsid)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL_SPU(fdatasync)
|
|
|
|
COMPAT_SYS(sysctl)
|
|
|
|
SYSCALL_SPU(mlock)
|
|
|
|
SYSCALL_SPU(munlock)
|
|
|
|
SYSCALL_SPU(mlockall)
|
|
|
|
SYSCALL_SPU(munlockall)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL_SPU(sched_setparam)
|
|
|
|
SYSCALL_SPU(sched_getparam)
|
|
|
|
SYSCALL_SPU(sched_setscheduler)
|
|
|
|
SYSCALL_SPU(sched_getscheduler)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL_SPU(sched_yield)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL_SPU(sched_get_priority_max)
|
|
|
|
SYSCALL_SPU(sched_get_priority_min)
|
|
|
|
COMPAT_SYS_SPU(sched_rr_get_interval)
|
2006-06-20 03:45:04 +07:00
|
|
|
COMPAT_SYS_SPU(nanosleep)
|
|
|
|
SYSCALL_SPU(mremap)
|
|
|
|
SYSCALL_SPU(setresuid)
|
|
|
|
SYSCALL_SPU(getresuid)
|
|
|
|
SYSCALL(ni_syscall)
|
|
|
|
SYSCALL_SPU(poll)
|
2011-08-29 07:38:57 +07:00
|
|
|
SYSCALL(ni_syscall)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL_SPU(setresgid)
|
|
|
|
SYSCALL_SPU(getresgid)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL_SPU(prctl)
|
2006-06-20 03:45:04 +07:00
|
|
|
COMPAT_SYS(rt_sigreturn)
|
|
|
|
COMPAT_SYS(rt_sigaction)
|
|
|
|
COMPAT_SYS(rt_sigprocmask)
|
|
|
|
COMPAT_SYS(rt_sigpending)
|
|
|
|
COMPAT_SYS(rt_sigtimedwait)
|
|
|
|
COMPAT_SYS(rt_sigqueueinfo)
|
|
|
|
COMPAT_SYS(rt_sigsuspend)
|
|
|
|
COMPAT_SYS_SPU(pread64)
|
|
|
|
COMPAT_SYS_SPU(pwrite64)
|
|
|
|
SYSCALL_SPU(chown)
|
|
|
|
SYSCALL_SPU(getcwd)
|
|
|
|
SYSCALL_SPU(capget)
|
|
|
|
SYSCALL_SPU(capset)
|
|
|
|
COMPAT_SYS(sigaltstack)
|
2012-09-19 18:01:52 +07:00
|
|
|
SYSX_SPU(sys_sendfile,compat_sys_sendfile_wrapper,sys_sendfile)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL(ni_syscall)
|
|
|
|
SYSCALL(ni_syscall)
|
|
|
|
PPC_SYS(vfork)
|
|
|
|
COMPAT_SYS_SPU(getrlimit)
|
|
|
|
COMPAT_SYS_SPU(readahead)
|
|
|
|
SYS32ONLY(mmap2)
|
|
|
|
SYS32ONLY(truncate64)
|
|
|
|
SYS32ONLY(ftruncate64)
|
|
|
|
SYSX(sys_ni_syscall,sys_stat64,sys_stat64)
|
|
|
|
SYSX(sys_ni_syscall,sys_lstat64,sys_lstat64)
|
|
|
|
SYSX(sys_ni_syscall,sys_fstat64,sys_fstat64)
|
|
|
|
SYSCALL(pciconfig_read)
|
|
|
|
SYSCALL(pciconfig_write)
|
|
|
|
SYSCALL(pciconfig_iobase)
|
|
|
|
SYSCALL(ni_syscall)
|
|
|
|
SYSCALL_SPU(getdents64)
|
|
|
|
SYSCALL_SPU(pivot_root)
|
|
|
|
SYSX(sys_ni_syscall,compat_sys_fcntl64,sys_fcntl64)
|
|
|
|
SYSCALL_SPU(madvise)
|
|
|
|
SYSCALL_SPU(mincore)
|
|
|
|
SYSCALL_SPU(gettid)
|
|
|
|
SYSCALL_SPU(tkill)
|
|
|
|
SYSCALL_SPU(setxattr)
|
|
|
|
SYSCALL_SPU(lsetxattr)
|
|
|
|
SYSCALL_SPU(fsetxattr)
|
|
|
|
SYSCALL_SPU(getxattr)
|
|
|
|
SYSCALL_SPU(lgetxattr)
|
|
|
|
SYSCALL_SPU(fgetxattr)
|
|
|
|
SYSCALL_SPU(listxattr)
|
|
|
|
SYSCALL_SPU(llistxattr)
|
|
|
|
SYSCALL_SPU(flistxattr)
|
|
|
|
SYSCALL_SPU(removexattr)
|
|
|
|
SYSCALL_SPU(lremovexattr)
|
|
|
|
SYSCALL_SPU(fremovexattr)
|
|
|
|
COMPAT_SYS_SPU(futex)
|
|
|
|
COMPAT_SYS_SPU(sched_setaffinity)
|
|
|
|
COMPAT_SYS_SPU(sched_getaffinity)
|
|
|
|
SYSCALL(ni_syscall)
|
|
|
|
SYSCALL(ni_syscall)
|
2012-09-19 18:01:52 +07:00
|
|
|
SYSX(sys_ni_syscall,compat_sys_sendfile64_wrapper,sys_sendfile64)
|
2006-06-20 03:45:04 +07:00
|
|
|
COMPAT_SYS_SPU(io_setup)
|
|
|
|
SYSCALL_SPU(io_destroy)
|
|
|
|
COMPAT_SYS_SPU(io_getevents)
|
|
|
|
COMPAT_SYS_SPU(io_submit)
|
|
|
|
SYSCALL_SPU(io_cancel)
|
|
|
|
SYSCALL(set_tid_address)
|
|
|
|
SYSX_SPU(sys_fadvise64,ppc32_fadvise64,sys_fadvise64)
|
|
|
|
SYSCALL(exit_group)
|
|
|
|
SYSX(sys_lookup_dcookie,ppc32_lookup_dcookie,sys_lookup_dcookie)
|
|
|
|
SYSCALL_SPU(epoll_create)
|
|
|
|
SYSCALL_SPU(epoll_ctl)
|
|
|
|
SYSCALL_SPU(epoll_wait)
|
|
|
|
SYSCALL_SPU(remap_file_pages)
|
|
|
|
SYSX_SPU(sys_timer_create,compat_sys_timer_create,sys_timer_create)
|
|
|
|
COMPAT_SYS_SPU(timer_settime)
|
|
|
|
COMPAT_SYS_SPU(timer_gettime)
|
|
|
|
SYSCALL_SPU(timer_getoverrun)
|
|
|
|
SYSCALL_SPU(timer_delete)
|
|
|
|
COMPAT_SYS_SPU(clock_settime)
|
|
|
|
COMPAT_SYS_SPU(clock_gettime)
|
|
|
|
COMPAT_SYS_SPU(clock_getres)
|
|
|
|
COMPAT_SYS_SPU(clock_nanosleep)
|
|
|
|
SYSX(ppc64_swapcontext,ppc32_swapcontext,ppc_swapcontext)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL_SPU(tgkill)
|
2006-06-20 03:45:04 +07:00
|
|
|
COMPAT_SYS_SPU(utimes)
|
|
|
|
COMPAT_SYS_SPU(statfs64)
|
|
|
|
COMPAT_SYS_SPU(fstatfs64)
|
|
|
|
SYSX(sys_ni_syscall, ppc_fadvise64_64, ppc_fadvise64_64)
|
|
|
|
PPC_SYS_SPU(rtas)
|
|
|
|
OLDSYS(debug_setcontext)
|
|
|
|
SYSCALL(ni_syscall)
|
2006-11-03 13:07:24 +07:00
|
|
|
COMPAT_SYS(migrate_pages)
|
2006-06-20 03:45:04 +07:00
|
|
|
COMPAT_SYS(mbind)
|
|
|
|
COMPAT_SYS(get_mempolicy)
|
|
|
|
COMPAT_SYS(set_mempolicy)
|
|
|
|
COMPAT_SYS(mq_open)
|
|
|
|
SYSCALL(mq_unlink)
|
|
|
|
COMPAT_SYS(mq_timedsend)
|
|
|
|
COMPAT_SYS(mq_timedreceive)
|
|
|
|
COMPAT_SYS(mq_notify)
|
|
|
|
COMPAT_SYS(mq_getsetattr)
|
|
|
|
COMPAT_SYS(kexec_load)
|
|
|
|
COMPAT_SYS(add_key)
|
|
|
|
COMPAT_SYS(request_key)
|
|
|
|
COMPAT_SYS(keyctl)
|
|
|
|
COMPAT_SYS(waitid)
|
2012-12-26 05:31:11 +07:00
|
|
|
SYSCALL(ioprio_set)
|
|
|
|
SYSCALL(ioprio_get)
|
2006-06-20 03:45:04 +07:00
|
|
|
SYSCALL(inotify_init)
|
|
|
|
SYSCALL(inotify_add_watch)
|
|
|
|
SYSCALL(inotify_rm_watch)
|
|
|
|
SYSCALL(spu_run)
|
|
|
|
SYSCALL(spu_create)
|
|
|
|
COMPAT_SYS(pselect6)
|
|
|
|
COMPAT_SYS(ppoll)
|
|
|
|
SYSCALL_SPU(unshare)
|
|
|
|
SYSCALL_SPU(splice)
|
|
|
|
SYSCALL_SPU(tee)
|
2007-04-17 12:53:12 +07:00
|
|
|
COMPAT_SYS_SPU(vmsplice)
|
2006-06-20 03:45:04 +07:00
|
|
|
COMPAT_SYS_SPU(openat)
|
|
|
|
SYSCALL_SPU(mkdirat)
|
|
|
|
SYSCALL_SPU(mknodat)
|
|
|
|
SYSCALL_SPU(fchownat)
|
|
|
|
COMPAT_SYS_SPU(futimesat)
|
|
|
|
SYSX_SPU(sys_newfstatat, sys_fstatat64, sys_fstatat64)
|
|
|
|
SYSCALL_SPU(unlinkat)
|
|
|
|
SYSCALL_SPU(renameat)
|
|
|
|
SYSCALL_SPU(linkat)
|
|
|
|
SYSCALL_SPU(symlinkat)
|
|
|
|
SYSCALL_SPU(readlinkat)
|
|
|
|
SYSCALL_SPU(fchmodat)
|
|
|
|
SYSCALL_SPU(faccessat)
|
|
|
|
COMPAT_SYS_SPU(get_robust_list)
|
|
|
|
COMPAT_SYS_SPU(set_robust_list)
|
2007-03-09 07:58:11 +07:00
|
|
|
COMPAT_SYS_SPU(move_pages)
|
2007-02-12 18:09:18 +07:00
|
|
|
SYSCALL_SPU(getcpu)
|
2007-03-09 07:57:10 +07:00
|
|
|
COMPAT_SYS(epoll_pwait)
|
2007-05-09 14:32:33 +07:00
|
|
|
COMPAT_SYS_SPU(utimensat)
|
2007-05-14 10:50:33 +07:00
|
|
|
COMPAT_SYS_SPU(signalfd)
|
2008-02-11 07:38:40 +07:00
|
|
|
SYSCALL_SPU(timerfd_create)
|
2007-05-14 10:50:33 +07:00
|
|
|
SYSCALL_SPU(eventfd)
|
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-28 04:10:09 +07:00
|
|
|
COMPAT_SYS_SPU(sync_file_range2)
|
2007-11-04 00:42:03 +07:00
|
|
|
COMPAT_SYS(fallocate)
|
[POWERPC] Provide a way to protect 4k subpages when using 64k pages
Using 64k pages on 64-bit PowerPC systems makes life difficult for
emulators that are trying to emulate an ISA, such as x86, which use a
smaller page size, since the emulator can no longer use the MMU and
the normal system calls for controlling page protections. Of course,
the emulator can emulate the MMU by checking and possibly remapping
the address for each memory access in software, but that is pretty
slow.
This provides a facility for such programs to control the access
permissions on individual 4k sub-pages of 64k pages. The idea is
that the emulator supplies an array of protection masks to apply to a
specified range of virtual addresses. These masks are applied at the
level where hardware PTEs are inserted into the hardware page table
based on the Linux PTEs, so the Linux PTEs are not affected. Note
that this new mechanism does not allow any access that would otherwise
be prohibited; it can only prohibit accesses that would otherwise be
allowed. This new facility is only available on 64-bit PowerPC and
only when the kernel is configured for 64k pages.
The masks are supplied using a new subpage_prot system call, which
takes a starting virtual address and length, and a pointer to an array
of protection masks in memory. The array has a 32-bit word per 64k
page to be protected; each 32-bit word consists of 16 2-bit fields,
for which 0 allows any access (that is otherwise allowed), 1 prevents
write accesses, and 2 or 3 prevent any access.
Implicit in this is that the regions of the address space that are
protected are switched to use 4k hardware pages rather than 64k
hardware pages (on machines with hardware 64k page support). In fact
the whole process is switched to use 4k hardware pages when the
subpage_prot system call is used, but this could be improved in future
to switch only the affected segments.
The subpage protection bits are stored in a 3 level tree akin to the
page table tree. The top level of this tree is stored in a structure
that is appended to the top level of the page table tree, i.e., the
pgd array. Since it will often only be 32-bit addresses (below 4GB)
that are protected, the pointers to the first four bottom level pages
are also stored in this structure (each bottom level page contains the
protection bits for 1GB of address space), so the protection bits for
addresses below 4GB can be accessed with one fewer loads than those
for higher addresses.
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-01-24 04:35:13 +07:00
|
|
|
SYSCALL(subpage_prot)
|
2008-02-11 07:38:40 +07:00
|
|
|
COMPAT_SYS_SPU(timerfd_settime)
|
|
|
|
COMPAT_SYS_SPU(timerfd_gettime)
|
2008-07-25 13:21:51 +07:00
|
|
|
COMPAT_SYS_SPU(signalfd4)
|
|
|
|
SYSCALL_SPU(eventfd2)
|
|
|
|
SYSCALL_SPU(epoll_create1)
|
|
|
|
SYSCALL_SPU(dup3)
|
|
|
|
SYSCALL_SPU(pipe2)
|
|
|
|
SYSCALL(inotify_init1)
|
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 17:02:48 +07:00
|
|
|
SYSCALL_SPU(perf_event_open)
|
2009-04-07 00:19:50 +07:00
|
|
|
COMPAT_SYS_SPU(preadv)
|
|
|
|
COMPAT_SYS_SPU(pwritev)
|
2009-06-11 05:22:08 +07:00
|
|
|
COMPAT_SYS(rt_tgsigqueueinfo)
|
2010-08-19 12:15:37 +07:00
|
|
|
SYSCALL(fanotify_init)
|
|
|
|
COMPAT_SYS(fanotify_mark)
|
|
|
|
SYSCALL_SPU(prlimit64)
|
2010-08-26 01:50:28 +07:00
|
|
|
SYSCALL_SPU(socket)
|
|
|
|
SYSCALL_SPU(bind)
|
|
|
|
SYSCALL_SPU(connect)
|
|
|
|
SYSCALL_SPU(listen)
|
|
|
|
SYSCALL_SPU(accept)
|
|
|
|
SYSCALL_SPU(getsockname)
|
|
|
|
SYSCALL_SPU(getpeername)
|
|
|
|
SYSCALL_SPU(socketpair)
|
|
|
|
SYSCALL_SPU(send)
|
|
|
|
SYSCALL_SPU(sendto)
|
|
|
|
COMPAT_SYS_SPU(recv)
|
|
|
|
COMPAT_SYS_SPU(recvfrom)
|
|
|
|
SYSCALL_SPU(shutdown)
|
|
|
|
COMPAT_SYS_SPU(setsockopt)
|
|
|
|
COMPAT_SYS_SPU(getsockopt)
|
|
|
|
COMPAT_SYS_SPU(sendmsg)
|
|
|
|
COMPAT_SYS_SPU(recvmsg)
|
|
|
|
COMPAT_SYS_SPU(recvmmsg)
|
|
|
|
SYSCALL_SPU(accept4)
|
2011-03-24 01:40:47 +07:00
|
|
|
SYSCALL_SPU(name_to_handle_at)
|
|
|
|
COMPAT_SYS_SPU(open_by_handle_at)
|
|
|
|
COMPAT_SYS_SPU(clock_adjtime)
|
|
|
|
SYSCALL_SPU(syncfs)
|
2011-05-03 03:21:35 +07:00
|
|
|
COMPAT_SYS_SPU(sendmmsg)
|
2011-05-28 09:28:27 +07:00
|
|
|
SYSCALL_SPU(setns)
|
2011-11-01 07:06:39 +07:00
|
|
|
COMPAT_SYS(process_vm_readv)
|
|
|
|
COMPAT_SYS(process_vm_writev)
|
2012-11-02 11:27:20 +07:00
|
|
|
SYSCALL(finit_module)
|