Commit 3dd681d9 authored by Will Deacon's avatar Will Deacon Committed by Catalin Marinas

arm64: 32-bit (compat) applications support

This patch adds support for 32-bit applications. The vectors page is a
binary blob mapped into the application user space at 0xffff0000 (the
AArch64 toolchain does not support compilation of AArch32 code). Full
compatibility with ARMv7 user space is supported. The use of deprecated
ARMv7 functionality (SWP, CP15 barriers) has been disabled by default on
AArch64 kernels and unaligned LDM/STM is not supported.

Please note that only the ARM 32-bit EABI is supported, so no OABI
compatibility.
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Acked-by: default avatarNicolas Pitre <nico@linaro.org>
Acked-by: default avatarOlof Johansson <olof@lixom.net>
Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
parent 0aea86a2
/*
* Copyright (C) 2012 ARM Ltd.
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ASM_COMPAT_H
#define __ASM_COMPAT_H
#ifdef __KERNEL__
#ifdef CONFIG_COMPAT
/*
* Architecture specific compatibility types
*/
#include <linux/types.h>
#include <linux/sched.h>
#define COMPAT_USER_HZ 100
#define COMPAT_UTS_MACHINE "armv8l\0\0"
typedef u32 compat_size_t;
typedef s32 compat_ssize_t;
typedef s32 compat_time_t;
typedef s32 compat_clock_t;
typedef s32 compat_pid_t;
typedef u32 __compat_uid_t;
typedef u32 __compat_gid_t;
typedef u32 __compat_uid32_t;
typedef u32 __compat_gid32_t;
typedef u32 compat_mode_t;
typedef u32 compat_ino_t;
typedef u32 compat_dev_t;
typedef s32 compat_off_t;
typedef s64 compat_loff_t;
typedef s16 compat_nlink_t;
typedef u16 compat_ipc_pid_t;
typedef s32 compat_daddr_t;
typedef u32 compat_caddr_t;
typedef __kernel_fsid_t compat_fsid_t;
typedef s32 compat_key_t;
typedef s32 compat_timer_t;
typedef s32 compat_int_t;
typedef s32 compat_long_t;
typedef s64 compat_s64;
typedef u32 compat_uint_t;
typedef u32 compat_ulong_t;
typedef u64 compat_u64;
struct compat_timespec {
compat_time_t tv_sec;
s32 tv_nsec;
};
struct compat_timeval {
compat_time_t tv_sec;
s32 tv_usec;
};
struct compat_stat {
compat_dev_t st_dev;
compat_ino_t st_ino;
compat_mode_t st_mode;
compat_nlink_t st_nlink;
__compat_uid32_t st_uid;
__compat_gid32_t st_gid;
compat_dev_t st_rdev;
compat_off_t st_size;
compat_off_t st_blksize;
compat_off_t st_blocks;
compat_time_t st_atime;
u32 st_atime_nsec;
compat_time_t st_mtime;
u32 st_mtime_nsec;
compat_time_t st_ctime;
u32 st_ctime_nsec;
u32 __unused4[2];
};
struct compat_flock {
short l_type;
short l_whence;
compat_off_t l_start;
compat_off_t l_len;
compat_pid_t l_pid;
};
#define F_GETLK64 12 /* using 'struct flock64' */
#define F_SETLK64 13
#define F_SETLKW64 14
struct compat_flock64 {
short l_type;
short l_whence;
compat_loff_t l_start;
compat_loff_t l_len;
compat_pid_t l_pid;
};
struct compat_statfs {
int f_type;
int f_bsize;
int f_blocks;
int f_bfree;
int f_bavail;
int f_files;
int f_ffree;
compat_fsid_t f_fsid;
int f_namelen; /* SunOS ignores this field. */
int f_frsize;
int f_flags;
int f_spare[4];
};
#define COMPAT_RLIM_INFINITY 0xffffffff
typedef u32 compat_old_sigset_t;
#define _COMPAT_NSIG 64
#define _COMPAT_NSIG_BPW 32
typedef u32 compat_sigset_word;
#define COMPAT_OFF_T_MAX 0x7fffffff
#define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL
/*
* A pointer passed in from user mode. This should not
* be used for syscall parameters, just declare them
* as pointers because the syscall entry code will have
* appropriately converted them already.
*/
typedef u32 compat_uptr_t;
static inline void __user *compat_ptr(compat_uptr_t uptr)
{
return (void __user *)(unsigned long)uptr;
}
static inline compat_uptr_t ptr_to_compat(void __user *uptr)
{
return (u32)(unsigned long)uptr;
}
static inline void __user *arch_compat_alloc_user_space(long len)
{
struct pt_regs *regs = task_pt_regs(current);
return (void __user *)regs->compat_sp - len;
}
struct compat_ipc64_perm {
compat_key_t key;
__compat_uid32_t uid;
__compat_gid32_t gid;
__compat_uid32_t cuid;
__compat_gid32_t cgid;
unsigned short mode;
unsigned short __pad1;
unsigned short seq;
unsigned short __pad2;
compat_ulong_t unused1;
compat_ulong_t unused2;
};
struct compat_semid64_ds {
struct compat_ipc64_perm sem_perm;
compat_time_t sem_otime;
compat_ulong_t __unused1;
compat_time_t sem_ctime;
compat_ulong_t __unused2;
compat_ulong_t sem_nsems;
compat_ulong_t __unused3;
compat_ulong_t __unused4;
};
struct compat_msqid64_ds {
struct compat_ipc64_perm msg_perm;
compat_time_t msg_stime;
compat_ulong_t __unused1;
compat_time_t msg_rtime;
compat_ulong_t __unused2;
compat_time_t msg_ctime;
compat_ulong_t __unused3;
compat_ulong_t msg_cbytes;
compat_ulong_t msg_qnum;
compat_ulong_t msg_qbytes;
compat_pid_t msg_lspid;
compat_pid_t msg_lrpid;
compat_ulong_t __unused4;
compat_ulong_t __unused5;
};
struct compat_shmid64_ds {
struct compat_ipc64_perm shm_perm;
compat_size_t shm_segsz;
compat_time_t shm_atime;
compat_ulong_t __unused1;
compat_time_t shm_dtime;
compat_ulong_t __unused2;
compat_time_t shm_ctime;
compat_ulong_t __unused3;
compat_pid_t shm_cpid;
compat_pid_t shm_lpid;
compat_ulong_t shm_nattch;
compat_ulong_t __unused4;
compat_ulong_t __unused5;
};
static inline int is_compat_task(void)
{
return test_thread_flag(TIF_32BIT);
}
static inline int is_compat_thread(struct thread_info *thread)
{
return test_ti_thread_flag(thread, TIF_32BIT);
}
#else /* !CONFIG_COMPAT */
static inline int is_compat_task(void)
{
return 0;
}
static inline int is_compat_thread(struct thread_info *thread)
{
return 0;
}
#endif /* CONFIG_COMPAT */
#endif /* __KERNEL__ */
#endif /* __ASM_COMPAT_H */
/*
* Copyright (C) 2012 ARM Ltd.
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __ASM_SIGNAL32_H
#define __ASM_SIGNAL32_H
#ifdef __KERNEL__
#ifdef CONFIG_COMPAT
#include <linux/compat.h>
#define AARCH32_KERN_SIGRET_CODE_OFFSET 0x500
extern const compat_ulong_t aarch32_sigret_code[6];
int compat_setup_frame(int usig, struct k_sigaction *ka, sigset_t *set,
struct pt_regs *regs);
int compat_setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
sigset_t *set, struct pt_regs *regs);
void compat_setup_restart_syscall(struct pt_regs *regs);
#else
static inline int compat_setup_frame(int usid, struct k_sigaction *ka,
sigset_t *set, struct pt_regs *regs)
{
return -ENOSYS;
}
static inline int compat_setup_rt_frame(int usig, struct k_sigaction *ka,
siginfo_t *info, sigset_t *set,
struct pt_regs *regs)
{
return -ENOSYS;
}
static inline void compat_setup_restart_syscall(struct pt_regs *regs)
{
}
#endif /* CONFIG_COMPAT */
#endif /* __KERNEL__ */
#endif /* __ASM_SIGNAL32_H */
/*
* Based on arch/arm/include/asm/unistd.h
*
* Copyright (C) 2001-2005 Russell King
* Copyright (C) 2012 ARM Ltd.
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#if !defined(__ASM_UNISTD32_H) || defined(__SYSCALL)
#define __ASM_UNISTD32_H
#ifndef __SYSCALL
#define __SYSCALL(x, y)
#endif
/*
* This file contains the system call numbers.
*/
#ifdef __SYSCALL_COMPAT
#define __NR_restart_syscall 0
__SYSCALL(__NR_restart_syscall, sys_restart_syscall)
#define __NR_exit 1
__SYSCALL(__NR_exit, sys_exit)
#define __NR_fork 2
__SYSCALL(__NR_fork, sys_fork)
#define __NR_read 3
__SYSCALL(__NR_read, sys_read)
#define __NR_write 4
__SYSCALL(__NR_write, sys_write)
#define __NR_open 5
__SYSCALL(__NR_open, sys_open)
#define __NR_close 6
__SYSCALL(__NR_close, sys_close)
__SYSCALL(7, sys_ni_syscall) /* 7 was sys_waitpid */
#define __NR_creat 8
__SYSCALL(__NR_creat, sys_creat)
#define __NR_link 9
__SYSCALL(__NR_link, sys_link)
#define __NR_unlink 10
__SYSCALL(__NR_unlink, sys_unlink)
#define __NR_execve 11
__SYSCALL(__NR_execve, sys_execve)
#define __NR_chdir 12
__SYSCALL(__NR_chdir, sys_chdir)
__SYSCALL(13, sys_ni_syscall) /* 13 was sys_time */
#define __NR_mknod 14
__SYSCALL(__NR_mknod, sys_mknod)
#define __NR_chmod 15
__SYSCALL(__NR_chmod, sys_chmod)
#define __NR_lchown 16
__SYSCALL(__NR_lchown, sys_lchown16)
__SYSCALL(17, sys_ni_syscall) /* 17 was sys_break */
__SYSCALL(18, sys_ni_syscall) /* 18 was sys_stat */
#define __NR_lseek 19
__SYSCALL(__NR_lseek, sys_lseek)
#define __NR_getpid 20
__SYSCALL(__NR_getpid, sys_getpid)
#define __NR_mount 21
__SYSCALL(__NR_mount, sys_mount)
__SYSCALL(22, sys_ni_syscall) /* 22 was sys_umount */
#define __NR_setuid 23
__SYSCALL(__NR_setuid, sys_setuid16)
#define __NR_getuid 24
__SYSCALL(__NR_getuid, sys_getuid16)
__SYSCALL(25, sys_ni_syscall) /* 25 was sys_stime */
#define __NR_ptrace 26
__SYSCALL(__NR_ptrace, sys_ptrace)
__SYSCALL(27, sys_ni_syscall) /* 27 was sys_alarm */
__SYSCALL(28, sys_ni_syscall) /* 28 was sys_fstat */
#define __NR_pause 29
__SYSCALL(__NR_pause, sys_pause)
__SYSCALL(30, sys_ni_syscall) /* 30 was sys_utime */
__SYSCALL(31, sys_ni_syscall) /* 31 was sys_stty */
__SYSCALL(32, sys_ni_syscall) /* 32 was sys_gtty */
#define __NR_access 33
__SYSCALL(__NR_access, sys_access)
#define __NR_nice 34
__SYSCALL(__NR_nice, sys_nice)
__SYSCALL(35, sys_ni_syscall) /* 35 was sys_ftime */
#define __NR_sync 36
__SYSCALL(__NR_sync, sys_sync)
#define __NR_kill 37
__SYSCALL(__NR_kill, sys_kill)
#define __NR_rename 38
__SYSCALL(__NR_rename, sys_rename)
#define __NR_mkdir 39
__SYSCALL(__NR_mkdir, sys_mkdir)
#define __NR_rmdir 40
__SYSCALL(__NR_rmdir, sys_rmdir)
#define __NR_dup 41
__SYSCALL(__NR_dup, sys_dup)
#define __NR_pipe 42
__SYSCALL(__NR_pipe, sys_pipe)
#define __NR_times 43
__SYSCALL(__NR_times, sys_times)
__SYSCALL(44, sys_ni_syscall) /* 44 was sys_prof */
#define __NR_brk 45
__SYSCALL(__NR_brk, sys_brk)
#define __NR_setgid 46
__SYSCALL(__NR_setgid, sys_setgid16)
#define __NR_getgid 47
__SYSCALL(__NR_getgid, sys_getgid16)
__SYSCALL(48, sys_ni_syscall) /* 48 was sys_signal */
#define __NR_geteuid 49
__SYSCALL(__NR_geteuid, sys_geteuid16)
#define __NR_getegid 50
__SYSCALL(__NR_getegid, sys_getegid16)
#define __NR_acct 51
__SYSCALL(__NR_acct, sys_acct)
#define __NR_umount2 52
__SYSCALL(__NR_umount2, sys_umount)
__SYSCALL(53, sys_ni_syscall) /* 53 was sys_lock */
#define __NR_ioctl 54
__SYSCALL(__NR_ioctl, sys_ioctl)
#define __NR_fcntl 55
__SYSCALL(__NR_fcntl, sys_fcntl)
__SYSCALL(56, sys_ni_syscall) /* 56 was sys_mpx */
#define __NR_setpgid 57
__SYSCALL(__NR_setpgid, sys_setpgid)
__SYSCALL(58, sys_ni_syscall) /* 58 was sys_ulimit */
__SYSCALL(59, sys_ni_syscall) /* 59 was sys_olduname */
#define __NR_umask 60
__SYSCALL(__NR_umask, sys_umask)
#define __NR_chroot 61
__SYSCALL(__NR_chroot, sys_chroot)
#define __NR_ustat 62
__SYSCALL(__NR_ustat, sys_ustat)
#define __NR_dup2 63
__SYSCALL(__NR_dup2, sys_dup2)
#define __NR_getppid 64
__SYSCALL(__NR_getppid, sys_getppid)
#define __NR_getpgrp 65
__SYSCALL(__NR_getpgrp, sys_getpgrp)
#define __NR_setsid 66
__SYSCALL(__NR_setsid, sys_setsid)
#define __NR_sigaction 67
__SYSCALL(__NR_sigaction, sys_sigaction)
__SYSCALL(68, sys_ni_syscall) /* 68 was sys_sgetmask */
__SYSCALL(69, sys_ni_syscall) /* 69 was sys_ssetmask */
#define __NR_setreuid 70
__SYSCALL(__NR_setreuid, sys_setreuid16)
#define __NR_setregid 71
__SYSCALL(__NR_setregid, sys_setregid16)
#define __NR_sigsuspend 72
__SYSCALL(__NR_sigsuspend, sys_sigsuspend)
#define __NR_sigpending 73
__SYSCALL(__NR_sigpending, sys_sigpending)
#define __NR_sethostname 74
__SYSCALL(__NR_sethostname, sys_sethostname)
#define __NR_setrlimit 75
__SYSCALL(__NR_setrlimit, sys_setrlimit)
__SYSCALL(76, sys_ni_syscall) /* 76 was sys_getrlimit */
#define __NR_getrusage 77
__SYSCALL(__NR_getrusage, sys_getrusage)
#define __NR_gettimeofday 78
__SYSCALL(__NR_gettimeofday, sys_gettimeofday)
#define __NR_settimeofday 79
__SYSCALL(__NR_settimeofday, sys_settimeofday)
#define __NR_getgroups 80
__SYSCALL(__NR_getgroups, sys_getgroups16)
#define __NR_setgroups 81
__SYSCALL(__NR_setgroups, sys_setgroups16)
__SYSCALL(82, sys_ni_syscall) /* 82 was sys_select */
#define __NR_symlink 83
__SYSCALL(__NR_symlink, sys_symlink)
__SYSCALL(84, sys_ni_syscall) /* 84 was sys_lstat */
#define __NR_readlink 85
__SYSCALL(__NR_readlink, sys_readlink)
#define __NR_uselib 86
__SYSCALL(__NR_uselib, sys_uselib)
#define __NR_swapon 87
__SYSCALL(__NR_swapon, sys_swapon)
#define __NR_reboot 88
__SYSCALL(__NR_reboot, sys_reboot)
__SYSCALL(89, sys_ni_syscall) /* 89 was sys_readdir */
__SYSCALL(90, sys_ni_syscall) /* 90 was sys_mmap */
#define __NR_munmap 91
__SYSCALL(__NR_munmap, sys_munmap)
#define __NR_truncate 92
__SYSCALL(__NR_truncate, sys_truncate)
#define __NR_ftruncate 93
__SYSCALL(__NR_ftruncate, sys_ftruncate)
#define __NR_fchmod 94
__SYSCALL(__NR_fchmod, sys_fchmod)
#define __NR_fchown 95
__SYSCALL(__NR_fchown, sys_fchown16)
#define __NR_getpriority 96
__SYSCALL(__NR_getpriority, sys_getpriority)
#define __NR_setpriority 97
__SYSCALL(__NR_setpriority, sys_setpriority)
__SYSCALL(98, sys_ni_syscall) /* 98 was sys_profil */
#define __NR_statfs 99
__SYSCALL(__NR_statfs, sys_statfs)
#define __NR_fstatfs 100
__SYSCALL(__NR_fstatfs, sys_fstatfs)
__SYSCALL(101, sys_ni_syscall) /* 101 was sys_ioperm */
__SYSCALL(102, sys_ni_syscall) /* 102 was sys_socketcall */
#define __NR_syslog 103
__SYSCALL(__NR_syslog, sys_syslog)
#define __NR_setitimer 104
__SYSCALL(__NR_setitimer, sys_setitimer)
#define __NR_getitimer 105
__SYSCALL(__NR_getitimer, sys_getitimer)
#define __NR_stat 106
__SYSCALL(__NR_stat, sys_newstat)
#define __NR_lstat 107
__SYSCALL(__NR_lstat, sys_newlstat)
#define __NR_fstat 108
__SYSCALL(__NR_fstat, sys_newfstat)
__SYSCALL(109, sys_ni_syscall) /* 109 was sys_uname */
__SYSCALL(110, sys_ni_syscall) /* 110 was sys_iopl */
#define __NR_vhangup 111
__SYSCALL(__NR_vhangup, sys_vhangup)
__SYSCALL(112, sys_ni_syscall) /* 112 was sys_idle */
__SYSCALL(113, sys_ni_syscall) /* 113 was sys_syscall */
#define __NR_wait4 114
__SYSCALL(__NR_wait4, sys_wait4)
#define __NR_swapoff 115
__SYSCALL(__NR_swapoff, sys_swapoff)
#define __NR_sysinfo 116
__SYSCALL(__NR_sysinfo, sys_sysinfo)
__SYSCALL(117, sys_ni_syscall) /* 117 was sys_ipc */
#define __NR_fsync 118
__SYSCALL(__NR_fsync, sys_fsync)
#define __NR_sigreturn 119
__SYSCALL(__NR_sigreturn, sys_sigreturn)
#define __NR_clone 120
__SYSCALL(__NR_clone, sys_clone)
#define __NR_setdomainname 121
__SYSCALL(__NR_setdomainname, sys_setdomainname)
#define __NR_uname 122
__SYSCALL(__NR_uname, sys_newuname)
__SYSCALL(123, sys_ni_syscall) /* 123 was sys_modify_ldt */
#define __NR_adjtimex 124
__SYSCALL(__NR_adjtimex, sys_adjtimex)
#define __NR_mprotect 125
__SYSCALL(__NR_mprotect, sys_mprotect)
#define __NR_sigprocmask 126
__SYSCALL(__NR_sigprocmask, sys_sigprocmask)
__SYSCALL(127, sys_ni_syscall) /* 127 was sys_create_module */
#define __NR_init_module 128
__SYSCALL(__NR_init_module, sys_init_module)
#define __NR_delete_module 129
__SYSCALL(__NR_delete_module, sys_delete_module)
__SYSCALL(130, sys_ni_syscall) /* 130 was sys_get_kernel_syms */
#define __NR_quotactl 131
__SYSCALL(__NR_quotactl, sys_quotactl)
#define __NR_getpgid 132
__SYSCALL(__NR_getpgid, sys_getpgid)
#define __NR_fchdir 133
__SYSCALL(__NR_fchdir, sys_fchdir)
#define __NR_bdflush 134
__SYSCALL(__NR_bdflush, sys_bdflush)
#define __NR_sysfs 135
__SYSCALL(__NR_sysfs, sys_sysfs)
#define __NR_personality 136
__SYSCALL(__NR_personality, sys_personality)
__SYSCALL(137, sys_ni_syscall) /* 137 was sys_afs_syscall */
#define __NR_setfsuid 138
__SYSCALL(__NR_setfsuid, sys_setfsuid16)
#define __NR_setfsgid 139
__SYSCALL(__NR_setfsgid, sys_setfsgid16)
#define __NR__llseek 140
__SYSCALL(__NR__llseek, sys_llseek)
#define __NR_getdents 141
__SYSCALL(__NR_getdents, sys_getdents)
#define __NR__newselect 142
__SYSCALL(__NR__newselect, sys_select)
#define __NR_flock 143
__SYSCALL(__NR_flock, sys_flock)
#define __NR_msync 144
__SYSCALL(__NR_msync, sys_msync)
#define __NR_readv 145
__SYSCALL(__NR_readv, sys_readv)
#define __NR_writev 146
__SYSCALL(__NR_writev, sys_writev)
#define __NR_getsid 147
__SYSCALL(__NR_getsid, sys_getsid)
#define __NR_fdatasync 148
__SYSCALL(__NR_fdatasync, sys_fdatasync)
#define __NR__sysctl 149
__SYSCALL(__NR__sysctl, sys_sysctl)
#define __NR_mlock 150
__SYSCALL(__NR_mlock, sys_mlock)
#define __NR_munlock 151
__SYSCALL(__NR_munlock, sys_munlock)
#define __NR_mlockall 152
__SYSCALL(__NR_mlockall, sys_mlockall)
#define __NR_munlockall 153
__SYSCALL(__NR_munlockall, sys_munlockall)
#define __NR_sched_setparam 154
__SYSCALL(__NR_sched_setparam, sys_sched_setparam)
#define __NR_sched_getparam 155
__SYSCALL(__NR_sched_getparam, sys_sched_getparam)
#define __NR_sched_setscheduler 156
__SYSCALL(__NR_sched_setscheduler, sys_sched_setscheduler)
#define __NR_sched_getscheduler 157
__SYSCALL(__NR_sched_getscheduler, sys_sched_getscheduler)
#define __NR_sched_yield 158
__SYSCALL(__NR_sched_yield, sys_sched_yield)
#define __NR_sched_get_priority_max 159
__SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max)
#define __NR_sched_get_priority_min 160
__SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min)
#define __NR_sched_rr_get_interval 161
__SYSCALL(__NR_sched_rr_get_interval, sys_sched_rr_get_interval)
#define __NR_nanosleep 162
__SYSCALL(__NR_nanosleep, sys_nanosleep)
#define __NR_mremap 163
__SYSCALL(__NR_mremap, sys_mremap)
#define __NR_setresuid 164
__SYSCALL(__NR_setresuid, sys_setresuid16)
#define __NR_getresuid 165
__SYSCALL(__NR_getresuid, sys_getresuid16)
__SYSCALL(166, sys_ni_syscall) /* 166 was sys_vm86 */
__SYSCALL(167, sys_ni_syscall) /* 167 was sys_query_module */
#define __NR_poll 168
__SYSCALL(__NR_poll, sys_poll)
#define __NR_nfsservctl 169
__SYSCALL(__NR_nfsservctl, sys_ni_syscall)
#define __NR_setresgid 170
__SYSCALL(__NR_setresgid, sys_setresgid16)
#define __NR_getresgid 171
__SYSCALL(__NR_getresgid, sys_getresgid16)
#define __NR_prctl 172
__SYSCALL(__NR_prctl, sys_prctl)
#define __NR_rt_sigreturn 173
__SYSCALL(__NR_rt_sigreturn, sys_rt_sigreturn)
#define __NR_rt_sigaction 174
__SYSCALL(__NR_rt_sigaction, sys_rt_sigaction)
#define __NR_rt_sigprocmask 175
__SYSCALL(__NR_rt_sigprocmask, sys_rt_sigprocmask)
#define __NR_rt_sigpending 176
__SYSCALL(__NR_rt_sigpending, sys_rt_sigpending)