aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic/unistd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-generic/unistd.h')
-rw-r--r--include/asm-generic/unistd.h39
1 files changed, 31 insertions, 8 deletions
diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h
index 6a0b30f78a62..b969770196c2 100644
--- a/include/asm-generic/unistd.h
+++ b/include/asm-generic/unistd.h
@@ -18,7 +18,7 @@
18#define __SYSCALL(x, y) 18#define __SYSCALL(x, y)
19#endif 19#endif
20 20
21#if __BITS_PER_LONG == 32 21#if __BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT)
22#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _32) 22#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _32)
23#else 23#else
24#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _64) 24#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _64)
@@ -241,8 +241,13 @@ __SYSCALL(__NR_sync, sys_sync)
241__SYSCALL(__NR_fsync, sys_fsync) 241__SYSCALL(__NR_fsync, sys_fsync)
242#define __NR_fdatasync 83 242#define __NR_fdatasync 83
243__SYSCALL(__NR_fdatasync, sys_fdatasync) 243__SYSCALL(__NR_fdatasync, sys_fdatasync)
244#ifdef __ARCH_WANT_SYNC_FILE_RANGE2
245#define __NR_sync_file_range2 84
246__SYSCALL(__NR_sync_file_range2, sys_sync_file_range2)
247#else
244#define __NR_sync_file_range 84 248#define __NR_sync_file_range 84
245__SYSCALL(__NR_sync_file_range, sys_sync_file_range) /* .long sys_sync_file_range2, */ 249__SYSCALL(__NR_sync_file_range, sys_sync_file_range)
250#endif
246 251
247/* fs/timerfd.c */ 252/* fs/timerfd.c */
248#define __NR_timerfd_create 85 253#define __NR_timerfd_create 85
@@ -580,7 +585,7 @@ __SYSCALL(__NR_execve, sys_execve) /* .long sys_execve_wrapper */
580__SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap) 585__SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap)
581/* mm/fadvise.c */ 586/* mm/fadvise.c */
582#define __NR3264_fadvise64 223 587#define __NR3264_fadvise64 223
583__SC_3264(__NR3264_fadvise64, sys_fadvise64_64, sys_fadvise64) 588__SYSCALL(__NR3264_fadvise64, sys_fadvise64_64)
584 589
585/* mm/, CONFIG_MMU only */ 590/* mm/, CONFIG_MMU only */
586#ifndef __ARCH_NOMMU 591#ifndef __ARCH_NOMMU
@@ -627,8 +632,23 @@ __SYSCALL(__NR_accept4, sys_accept4)
627#define __NR_recvmmsg 243 632#define __NR_recvmmsg 243
628__SYSCALL(__NR_recvmmsg, sys_recvmmsg) 633__SYSCALL(__NR_recvmmsg, sys_recvmmsg)
629 634
635/*
636 * Architectures may provide up to 16 syscalls of their own
637 * starting with this value.
638 */
639#define __NR_arch_specific_syscall 244
640
641#define __NR_wait4 260
642__SYSCALL(__NR_wait4, sys_wait4)
643#define __NR_prlimit64 261
644__SYSCALL(__NR_prlimit64, sys_prlimit64)
645#define __NR_fanotify_init 262
646__SYSCALL(__NR_fanotify_init, sys_fanotify_init)
647#define __NR_fanotify_mark 263
648__SYSCALL(__NR_fanotify_mark, sys_fanotify_mark)
649
630#undef __NR_syscalls 650#undef __NR_syscalls
631#define __NR_syscalls 244 651#define __NR_syscalls 264
632 652
633/* 653/*
634 * All syscalls below here should go away really, 654 * All syscalls below here should go away really,
@@ -694,7 +714,8 @@ __SYSCALL(__NR_signalfd, sys_signalfd)
694#define __NR_syscalls (__NR_signalfd+1) 714#define __NR_syscalls (__NR_signalfd+1)
695#endif /* __ARCH_WANT_SYSCALL_NO_FLAGS */ 715#endif /* __ARCH_WANT_SYSCALL_NO_FLAGS */
696 716
697#if __BITS_PER_LONG == 32 && defined(__ARCH_WANT_SYSCALL_OFF_T) 717#if (__BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT)) && \
718 defined(__ARCH_WANT_SYSCALL_OFF_T)
698#define __NR_sendfile 1046 719#define __NR_sendfile 1046
699__SYSCALL(__NR_sendfile, sys_sendfile) 720__SYSCALL(__NR_sendfile, sys_sendfile)
700#define __NR_ftruncate 1047 721#define __NR_ftruncate 1047
@@ -740,6 +761,7 @@ __SYSCALL(__NR_getpgrp, sys_getpgrp)
740__SYSCALL(__NR_pause, sys_pause) 761__SYSCALL(__NR_pause, sys_pause)
741#define __NR_time 1062 762#define __NR_time 1062
742#define __ARCH_WANT_SYS_TIME 763#define __ARCH_WANT_SYS_TIME
764#define __ARCH_WANT_COMPAT_SYS_TIME
743__SYSCALL(__NR_time, sys_time) 765__SYSCALL(__NR_time, sys_time)
744#define __NR_utime 1063 766#define __NR_utime 1063
745#define __ARCH_WANT_SYS_UTIME 767#define __ARCH_WANT_SYS_UTIME
@@ -763,8 +785,8 @@ __SYSCALL(__NR_epoll_wait, sys_epoll_wait)
763__SYSCALL(__NR_ustat, sys_ustat) 785__SYSCALL(__NR_ustat, sys_ustat)
764#define __NR_vfork 1071 786#define __NR_vfork 1071
765__SYSCALL(__NR_vfork, sys_vfork) 787__SYSCALL(__NR_vfork, sys_vfork)
766#define __NR_wait4 1072 788#define __NR_oldwait4 1072
767__SYSCALL(__NR_wait4, sys_wait4) 789__SYSCALL(__NR_oldwait4, sys_wait4)
768#define __NR_recv 1073 790#define __NR_recv 1073
769__SYSCALL(__NR_recv, sys_recv) 791__SYSCALL(__NR_recv, sys_recv)
770#define __NR_send 1074 792#define __NR_send 1074
@@ -801,7 +823,7 @@ __SYSCALL(__NR_fork, sys_ni_syscall)
801 * Here we map the numbers so that both versions 823 * Here we map the numbers so that both versions
802 * use the same syscall table layout. 824 * use the same syscall table layout.
803 */ 825 */
804#if __BITS_PER_LONG == 64 826#if __BITS_PER_LONG == 64 && !defined(__SYSCALL_COMPAT)
805#define __NR_fcntl __NR3264_fcntl 827#define __NR_fcntl __NR3264_fcntl
806#define __NR_statfs __NR3264_statfs 828#define __NR_statfs __NR3264_statfs
807#define __NR_fstatfs __NR3264_fstatfs 829#define __NR_fstatfs __NR3264_fstatfs
@@ -848,6 +870,7 @@ __SYSCALL(__NR_fork, sys_ni_syscall)
848#endif 870#endif
849#define __ARCH_WANT_SYS_RT_SIGACTION 871#define __ARCH_WANT_SYS_RT_SIGACTION
850#define __ARCH_WANT_SYS_RT_SIGSUSPEND 872#define __ARCH_WANT_SYS_RT_SIGSUSPEND
873#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
851 874
852/* 875/*
853 * "Conditional" syscalls 876 * "Conditional" syscalls