xref: /openbmc/linux/arch/sparc/include/asm/unistd.h (revision d33c577cccd0b3e5bb2425f85037f26714a59363)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
29acee190SStephen Rothwell /*
39acee190SStephen Rothwell  * System calls under the Sparc.
49acee190SStephen Rothwell  *
59acee190SStephen Rothwell  * Don't be scared by the ugly clobbers, it is the only way I can
69acee190SStephen Rothwell  * think of right now to force the arguments into fixed registers
79acee190SStephen Rothwell  * before the trap into the system call with gcc 'asm' statements.
89acee190SStephen Rothwell  *
99acee190SStephen Rothwell  * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net)
109acee190SStephen Rothwell  *
119acee190SStephen Rothwell  * SunOS compatibility based upon preliminary work which is:
129acee190SStephen Rothwell  *
139acee190SStephen Rothwell  * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)
149acee190SStephen Rothwell  */
1554579826SDavid Howells #ifndef _SPARC_UNISTD_H
1654579826SDavid Howells #define _SPARC_UNISTD_H
179acee190SStephen Rothwell 
1854579826SDavid Howells #include <uapi/asm/unistd.h>
1954579826SDavid Howells 
2061257f56SFiroz Khan #define NR_syscalls	__NR_syscalls
2161257f56SFiroz Khan 
229acee190SStephen Rothwell #ifdef __32bit_syscall_numbers__
23a439fe51SSam Ravnborg #else
249acee190SStephen Rothwell #define __NR_time		231 /* Linux sparc32                               */
25a439fe51SSam Ravnborg #endif
2682b355d1SArnd Bergmann #define __ARCH_WANT_NEW_STAT
279acee190SStephen Rothwell #define __ARCH_WANT_OLD_READDIR
289acee190SStephen Rothwell #define __ARCH_WANT_STAT64
299acee190SStephen Rothwell #define __ARCH_WANT_SYS_ALARM
309acee190SStephen Rothwell #define __ARCH_WANT_SYS_GETHOSTNAME
319acee190SStephen Rothwell #define __ARCH_WANT_SYS_PAUSE
329acee190SStephen Rothwell #define __ARCH_WANT_SYS_SIGNAL
33*d33c577cSArnd Bergmann #define __ARCH_WANT_SYS_TIME32
34*d33c577cSArnd Bergmann #define __ARCH_WANT_SYS_UTIME32
359acee190SStephen Rothwell #define __ARCH_WANT_SYS_WAITPID
369acee190SStephen Rothwell #define __ARCH_WANT_SYS_SOCKETCALL
379acee190SStephen Rothwell #define __ARCH_WANT_SYS_FADVISE64
389acee190SStephen Rothwell #define __ARCH_WANT_SYS_GETPGRP
399acee190SStephen Rothwell #define __ARCH_WANT_SYS_NICE
409acee190SStephen Rothwell #define __ARCH_WANT_SYS_OLDUMOUNT
419acee190SStephen Rothwell #define __ARCH_WANT_SYS_SIGPENDING
429acee190SStephen Rothwell #define __ARCH_WANT_SYS_SIGPROCMASK
43baed7fc9SChristoph Hellwig #ifdef __32bit_syscall_numbers__
44baed7fc9SChristoph Hellwig #define __ARCH_WANT_SYS_IPC
45baed7fc9SChristoph Hellwig #else
46*d33c577cSArnd Bergmann #define __ARCH_WANT_SYS_TIME
47*d33c577cSArnd Bergmann #define __ARCH_WANT_SYS_UTIME
488f9c0119SCatalin Marinas #define __ARCH_WANT_COMPAT_SYS_SENDFILE
499acee190SStephen Rothwell #endif
509acee190SStephen Rothwell 
51d441f93dSFiroz Khan #ifdef __32bit_syscall_numbers__
52d441f93dSFiroz Khan /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants,
53d441f93dSFiroz Khan  * it never had the plain ones and there is no value to adding those
54d441f93dSFiroz Khan  * old versions into the syscall table.
55d441f93dSFiroz Khan  */
56d441f93dSFiroz Khan #define __IGNORE_setresuid
57d441f93dSFiroz Khan #define __IGNORE_getresuid
58d441f93dSFiroz Khan #define __IGNORE_setresgid
59d441f93dSFiroz Khan #define __IGNORE_getresgid
60d441f93dSFiroz Khan #endif
61d441f93dSFiroz Khan 
629acee190SStephen Rothwell #endif /* _SPARC_UNISTD_H */
63