xref: /OK3568_Linux_fs/kernel/arch/sparc/include/asm/unistd.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * System calls under the Sparc.
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Don't be scared by the ugly clobbers, it is the only way I can
6*4882a593Smuzhiyun  * think of right now to force the arguments into fixed registers
7*4882a593Smuzhiyun  * before the trap into the system call with gcc 'asm' statements.
8*4882a593Smuzhiyun  *
9*4882a593Smuzhiyun  * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net)
10*4882a593Smuzhiyun  *
11*4882a593Smuzhiyun  * SunOS compatibility based upon preliminary work which is:
12*4882a593Smuzhiyun  *
13*4882a593Smuzhiyun  * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)
14*4882a593Smuzhiyun  */
15*4882a593Smuzhiyun #ifndef _SPARC_UNISTD_H
16*4882a593Smuzhiyun #define _SPARC_UNISTD_H
17*4882a593Smuzhiyun 
18*4882a593Smuzhiyun #include <uapi/asm/unistd.h>
19*4882a593Smuzhiyun 
20*4882a593Smuzhiyun #define NR_syscalls	__NR_syscalls
21*4882a593Smuzhiyun 
22*4882a593Smuzhiyun #ifdef __32bit_syscall_numbers__
23*4882a593Smuzhiyun #else
24*4882a593Smuzhiyun #define __NR_time		231 /* Linux sparc32                               */
25*4882a593Smuzhiyun #endif
26*4882a593Smuzhiyun #define __ARCH_WANT_NEW_STAT
27*4882a593Smuzhiyun #define __ARCH_WANT_OLD_READDIR
28*4882a593Smuzhiyun #define __ARCH_WANT_STAT64
29*4882a593Smuzhiyun #define __ARCH_WANT_SYS_ALARM
30*4882a593Smuzhiyun #define __ARCH_WANT_SYS_GETHOSTNAME
31*4882a593Smuzhiyun #define __ARCH_WANT_SYS_PAUSE
32*4882a593Smuzhiyun #define __ARCH_WANT_SYS_SIGNAL
33*4882a593Smuzhiyun #define __ARCH_WANT_SYS_TIME32
34*4882a593Smuzhiyun #define __ARCH_WANT_SYS_UTIME32
35*4882a593Smuzhiyun #define __ARCH_WANT_SYS_WAITPID
36*4882a593Smuzhiyun #define __ARCH_WANT_SYS_SOCKETCALL
37*4882a593Smuzhiyun #define __ARCH_WANT_SYS_FADVISE64
38*4882a593Smuzhiyun #define __ARCH_WANT_SYS_GETPGRP
39*4882a593Smuzhiyun #define __ARCH_WANT_SYS_NICE
40*4882a593Smuzhiyun #define __ARCH_WANT_SYS_OLDUMOUNT
41*4882a593Smuzhiyun #define __ARCH_WANT_SYS_SIGPENDING
42*4882a593Smuzhiyun #define __ARCH_WANT_SYS_SIGPROCMASK
43*4882a593Smuzhiyun #ifdef __32bit_syscall_numbers__
44*4882a593Smuzhiyun #define __ARCH_WANT_SYS_IPC
45*4882a593Smuzhiyun #else
46*4882a593Smuzhiyun #define __ARCH_WANT_SYS_TIME
47*4882a593Smuzhiyun #define __ARCH_WANT_SYS_UTIME
48*4882a593Smuzhiyun #define __ARCH_WANT_COMPAT_SYS_SENDFILE
49*4882a593Smuzhiyun #endif
50*4882a593Smuzhiyun 
51*4882a593Smuzhiyun #ifdef __32bit_syscall_numbers__
52*4882a593Smuzhiyun /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants,
53*4882a593Smuzhiyun  * it never had the plain ones and there is no value to adding those
54*4882a593Smuzhiyun  * old versions into the syscall table.
55*4882a593Smuzhiyun  */
56*4882a593Smuzhiyun #define __IGNORE_setresuid
57*4882a593Smuzhiyun #define __IGNORE_getresuid
58*4882a593Smuzhiyun #define __IGNORE_setresgid
59*4882a593Smuzhiyun #define __IGNORE_getresgid
60*4882a593Smuzhiyun #endif
61*4882a593Smuzhiyun 
62*4882a593Smuzhiyun #endif /* _SPARC_UNISTD_H */
63