xref: /openbmc/linux/arch/arm64/include/asm/unistd.h (revision d6e2d652)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (C) 2012 ARM Ltd.
4  */
5 #ifdef CONFIG_COMPAT
6 #define __ARCH_WANT_COMPAT_STAT
7 #define __ARCH_WANT_COMPAT_STAT64
8 #define __ARCH_WANT_SYS_GETHOSTNAME
9 #define __ARCH_WANT_SYS_PAUSE
10 #define __ARCH_WANT_SYS_GETPGRP
11 #define __ARCH_WANT_SYS_NICE
12 #define __ARCH_WANT_SYS_SIGPENDING
13 #define __ARCH_WANT_SYS_SIGPROCMASK
14 #define __ARCH_WANT_COMPAT_SYS_SENDFILE
15 #define __ARCH_WANT_SYS_UTIME32
16 #define __ARCH_WANT_SYS_FORK
17 #define __ARCH_WANT_SYS_VFORK
18 
19 /*
20  * Compat syscall numbers used by the AArch64 kernel.
21  */
22 #define __NR_compat_restart_syscall	0
23 #define __NR_compat_exit		1
24 #define __NR_compat_read		3
25 #define __NR_compat_write		4
26 #define __NR_compat_gettimeofday	78
27 #define __NR_compat_sigreturn		119
28 #define __NR_compat_rt_sigreturn	173
29 #define __NR_compat_clock_gettime	263
30 #define __NR_compat_clock_getres	264
31 #define __NR_compat_clock_gettime64	403
32 #define __NR_compat_clock_getres_time64	406
33 
34 /*
35  * The following SVCs are ARM private.
36  */
37 #define __ARM_NR_COMPAT_BASE		0x0f0000
38 #define __ARM_NR_compat_cacheflush	(__ARM_NR_COMPAT_BASE + 2)
39 #define __ARM_NR_compat_set_tls		(__ARM_NR_COMPAT_BASE + 5)
40 #define __ARM_NR_COMPAT_END		(__ARM_NR_COMPAT_BASE + 0x800)
41 
42 #define __NR_compat_syscalls		452
43 #endif
44 
45 #define __ARCH_WANT_SYS_CLONE
46 
47 #ifndef __COMPAT_SYSCALL_NR
48 #include <uapi/asm/unistd.h>
49 #endif
50 
51 #define NR_syscalls (__NR_syscalls)
52