diff options
Diffstat (limited to 'include/asm-generic/unistd.h')
-rw-r--r-- | include/asm-generic/unistd.h | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h index 6a0b30f78a62..30218b4fa4e0 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,14 @@ __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 | |||
630 | #undef __NR_syscalls | 641 | #undef __NR_syscalls |
631 | #define __NR_syscalls 244 | 642 | #define __NR_syscalls 260 |
632 | 643 | ||
633 | /* | 644 | /* |
634 | * All syscalls below here should go away really, | 645 | * All syscalls below here should go away really, |
@@ -694,7 +705,8 @@ __SYSCALL(__NR_signalfd, sys_signalfd) | |||
694 | #define __NR_syscalls (__NR_signalfd+1) | 705 | #define __NR_syscalls (__NR_signalfd+1) |
695 | #endif /* __ARCH_WANT_SYSCALL_NO_FLAGS */ | 706 | #endif /* __ARCH_WANT_SYSCALL_NO_FLAGS */ |
696 | 707 | ||
697 | #if __BITS_PER_LONG == 32 && defined(__ARCH_WANT_SYSCALL_OFF_T) | 708 | #if (__BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT)) && \ |
709 | defined(__ARCH_WANT_SYSCALL_OFF_T) | ||
698 | #define __NR_sendfile 1046 | 710 | #define __NR_sendfile 1046 |
699 | __SYSCALL(__NR_sendfile, sys_sendfile) | 711 | __SYSCALL(__NR_sendfile, sys_sendfile) |
700 | #define __NR_ftruncate 1047 | 712 | #define __NR_ftruncate 1047 |
@@ -740,6 +752,7 @@ __SYSCALL(__NR_getpgrp, sys_getpgrp) | |||
740 | __SYSCALL(__NR_pause, sys_pause) | 752 | __SYSCALL(__NR_pause, sys_pause) |
741 | #define __NR_time 1062 | 753 | #define __NR_time 1062 |
742 | #define __ARCH_WANT_SYS_TIME | 754 | #define __ARCH_WANT_SYS_TIME |
755 | #define __ARCH_WANT_COMPAT_SYS_TIME | ||
743 | __SYSCALL(__NR_time, sys_time) | 756 | __SYSCALL(__NR_time, sys_time) |
744 | #define __NR_utime 1063 | 757 | #define __NR_utime 1063 |
745 | #define __ARCH_WANT_SYS_UTIME | 758 | #define __ARCH_WANT_SYS_UTIME |
@@ -801,7 +814,7 @@ __SYSCALL(__NR_fork, sys_ni_syscall) | |||
801 | * Here we map the numbers so that both versions | 814 | * Here we map the numbers so that both versions |
802 | * use the same syscall table layout. | 815 | * use the same syscall table layout. |
803 | */ | 816 | */ |
804 | #if __BITS_PER_LONG == 64 | 817 | #if __BITS_PER_LONG == 64 && !defined(__SYSCALL_COMPAT) |
805 | #define __NR_fcntl __NR3264_fcntl | 818 | #define __NR_fcntl __NR3264_fcntl |
806 | #define __NR_statfs __NR3264_statfs | 819 | #define __NR_statfs __NR3264_statfs |
807 | #define __NR_fstatfs __NR3264_fstatfs | 820 | #define __NR_fstatfs __NR3264_fstatfs |
@@ -848,6 +861,7 @@ __SYSCALL(__NR_fork, sys_ni_syscall) | |||
848 | #endif | 861 | #endif |
849 | #define __ARCH_WANT_SYS_RT_SIGACTION | 862 | #define __ARCH_WANT_SYS_RT_SIGACTION |
850 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | 863 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND |
864 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND | ||
851 | 865 | ||
852 | /* | 866 | /* |
853 | * "Conditional" syscalls | 867 | * "Conditional" syscalls |