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.h54
1 files changed, 43 insertions, 11 deletions
diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h
index 5b34b6233d6d..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
@@ -618,15 +623,39 @@ __SYSCALL(__NR_migrate_pages, sys_migrate_pages)
618__SYSCALL(__NR_move_pages, sys_move_pages) 623__SYSCALL(__NR_move_pages, sys_move_pages)
619#endif 624#endif
620 625
626#define __NR_rt_tgsigqueueinfo 240
627__SYSCALL(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo)
628#define __NR_perf_event_open 241
629__SYSCALL(__NR_perf_event_open, sys_perf_event_open)
630#define __NR_accept4 242
631__SYSCALL(__NR_accept4, sys_accept4)
632#define __NR_recvmmsg 243
633__SYSCALL(__NR_recvmmsg, sys_recvmmsg)
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
621#undef __NR_syscalls 650#undef __NR_syscalls
622#define __NR_syscalls 240 651#define __NR_syscalls 264
623 652
624/* 653/*
625 * All syscalls below here should go away really, 654 * All syscalls below here should go away really,
626 * these are provided for both review and as a porting 655 * these are provided for both review and as a porting
627 * help for the C library version. 656 * help for the C library version.
628* 657*
629 * Last chance: are any of these important enought to 658 * Last chance: are any of these important enough to
630 * enable by default? 659 * enable by default?
631 */ 660 */
632#ifdef __ARCH_WANT_SYSCALL_NO_AT 661#ifdef __ARCH_WANT_SYSCALL_NO_AT
@@ -685,7 +714,8 @@ __SYSCALL(__NR_signalfd, sys_signalfd)
685#define __NR_syscalls (__NR_signalfd+1) 714#define __NR_syscalls (__NR_signalfd+1)
686#endif /* __ARCH_WANT_SYSCALL_NO_FLAGS */ 715#endif /* __ARCH_WANT_SYSCALL_NO_FLAGS */
687 716
688#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)
689#define __NR_sendfile 1046 719#define __NR_sendfile 1046
690__SYSCALL(__NR_sendfile, sys_sendfile) 720__SYSCALL(__NR_sendfile, sys_sendfile)
691#define __NR_ftruncate 1047 721#define __NR_ftruncate 1047
@@ -731,6 +761,7 @@ __SYSCALL(__NR_getpgrp, sys_getpgrp)
731__SYSCALL(__NR_pause, sys_pause) 761__SYSCALL(__NR_pause, sys_pause)
732#define __NR_time 1062 762#define __NR_time 1062
733#define __ARCH_WANT_SYS_TIME 763#define __ARCH_WANT_SYS_TIME
764#define __ARCH_WANT_COMPAT_SYS_TIME
734__SYSCALL(__NR_time, sys_time) 765__SYSCALL(__NR_time, sys_time)
735#define __NR_utime 1063 766#define __NR_utime 1063
736#define __ARCH_WANT_SYS_UTIME 767#define __ARCH_WANT_SYS_UTIME
@@ -754,8 +785,8 @@ __SYSCALL(__NR_epoll_wait, sys_epoll_wait)
754__SYSCALL(__NR_ustat, sys_ustat) 785__SYSCALL(__NR_ustat, sys_ustat)
755#define __NR_vfork 1071 786#define __NR_vfork 1071
756__SYSCALL(__NR_vfork, sys_vfork) 787__SYSCALL(__NR_vfork, sys_vfork)
757#define __NR_wait4 1072 788#define __NR_oldwait4 1072
758__SYSCALL(__NR_wait4, sys_wait4) 789__SYSCALL(__NR_oldwait4, sys_wait4)
759#define __NR_recv 1073 790#define __NR_recv 1073
760__SYSCALL(__NR_recv, sys_recv) 791__SYSCALL(__NR_recv, sys_recv)
761#define __NR_send 1074 792#define __NR_send 1074
@@ -792,12 +823,12 @@ __SYSCALL(__NR_fork, sys_ni_syscall)
792 * Here we map the numbers so that both versions 823 * Here we map the numbers so that both versions
793 * use the same syscall table layout. 824 * use the same syscall table layout.
794 */ 825 */
795#if __BITS_PER_LONG == 64 826#if __BITS_PER_LONG == 64 && !defined(__SYSCALL_COMPAT)
796#define __NR_fcntl __NR3264_fcntl 827#define __NR_fcntl __NR3264_fcntl
797#define __NR_statfs __NR3264_statfs 828#define __NR_statfs __NR3264_statfs
798#define __NR_fstatfs __NR3264_fstatfs 829#define __NR_fstatfs __NR3264_fstatfs
799#define __NR_truncate __NR3264_truncate 830#define __NR_truncate __NR3264_truncate
800#define __NR_ftruncate __NR3264_truncate 831#define __NR_ftruncate __NR3264_ftruncate
801#define __NR_lseek __NR3264_lseek 832#define __NR_lseek __NR3264_lseek
802#define __NR_sendfile __NR3264_sendfile 833#define __NR_sendfile __NR3264_sendfile
803#define __NR_newfstatat __NR3264_fstatat 834#define __NR_newfstatat __NR3264_fstatat
@@ -813,7 +844,7 @@ __SYSCALL(__NR_fork, sys_ni_syscall)
813#define __NR_statfs64 __NR3264_statfs 844#define __NR_statfs64 __NR3264_statfs
814#define __NR_fstatfs64 __NR3264_fstatfs 845#define __NR_fstatfs64 __NR3264_fstatfs
815#define __NR_truncate64 __NR3264_truncate 846#define __NR_truncate64 __NR3264_truncate
816#define __NR_ftruncate64 __NR3264_truncate 847#define __NR_ftruncate64 __NR3264_ftruncate
817#define __NR_llseek __NR3264_lseek 848#define __NR_llseek __NR3264_lseek
818#define __NR_sendfile64 __NR3264_sendfile 849#define __NR_sendfile64 __NR3264_sendfile
819#define __NR_fstatat64 __NR3264_fstatat 850#define __NR_fstatat64 __NR3264_fstatat
@@ -839,6 +870,7 @@ __SYSCALL(__NR_fork, sys_ni_syscall)
839#endif 870#endif
840#define __ARCH_WANT_SYS_RT_SIGACTION 871#define __ARCH_WANT_SYS_RT_SIGACTION
841#define __ARCH_WANT_SYS_RT_SIGSUSPEND 872#define __ARCH_WANT_SYS_RT_SIGSUSPEND
873#define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
842 874
843/* 875/*
844 * "Conditional" syscalls 876 * "Conditional" syscalls