Stephen Rothwell | 9acee19 | 2008-11-26 00:51:32 -0800 | [diff] [blame] | 1 | /* |
| 2 | * System calls under the Sparc. |
| 3 | * |
| 4 | * Don't be scared by the ugly clobbers, it is the only way I can |
| 5 | * think of right now to force the arguments into fixed registers |
| 6 | * before the trap into the system call with gcc 'asm' statements. |
| 7 | * |
| 8 | * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net) |
| 9 | * |
| 10 | * SunOS compatibility based upon preliminary work which is: |
| 11 | * |
| 12 | * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) |
| 13 | */ |
David Howells | 5457982 | 2012-10-09 09:47:43 +0100 | [diff] [blame^] | 14 | #ifndef _SPARC_UNISTD_H |
| 15 | #define _SPARC_UNISTD_H |
Stephen Rothwell | 9acee19 | 2008-11-26 00:51:32 -0800 | [diff] [blame] | 16 | |
David Howells | 5457982 | 2012-10-09 09:47:43 +0100 | [diff] [blame^] | 17 | #include <uapi/asm/unistd.h> |
| 18 | |
Stephen Rothwell | 9acee19 | 2008-11-26 00:51:32 -0800 | [diff] [blame] | 19 | #ifdef __32bit_syscall_numbers__ |
Sam Ravnborg | a439fe5 | 2008-07-27 23:00:59 +0200 | [diff] [blame] | 20 | #else |
Stephen Rothwell | 9acee19 | 2008-11-26 00:51:32 -0800 | [diff] [blame] | 21 | #define __NR_time 231 /* Linux sparc32 */ |
Sam Ravnborg | a439fe5 | 2008-07-27 23:00:59 +0200 | [diff] [blame] | 22 | #endif |
Stephen Rothwell | 9acee19 | 2008-11-26 00:51:32 -0800 | [diff] [blame] | 23 | #define __ARCH_WANT_OLD_READDIR |
| 24 | #define __ARCH_WANT_STAT64 |
| 25 | #define __ARCH_WANT_SYS_ALARM |
| 26 | #define __ARCH_WANT_SYS_GETHOSTNAME |
| 27 | #define __ARCH_WANT_SYS_PAUSE |
| 28 | #define __ARCH_WANT_SYS_SGETMASK |
| 29 | #define __ARCH_WANT_SYS_SIGNAL |
| 30 | #define __ARCH_WANT_SYS_TIME |
| 31 | #define __ARCH_WANT_SYS_UTIME |
| 32 | #define __ARCH_WANT_SYS_WAITPID |
| 33 | #define __ARCH_WANT_SYS_SOCKETCALL |
| 34 | #define __ARCH_WANT_SYS_FADVISE64 |
| 35 | #define __ARCH_WANT_SYS_GETPGRP |
| 36 | #define __ARCH_WANT_SYS_LLSEEK |
| 37 | #define __ARCH_WANT_SYS_NICE |
| 38 | #define __ARCH_WANT_SYS_OLDUMOUNT |
| 39 | #define __ARCH_WANT_SYS_SIGPENDING |
| 40 | #define __ARCH_WANT_SYS_SIGPROCMASK |
| 41 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND |
Christoph Hellwig | baed7fc | 2010-03-10 15:21:18 -0800 | [diff] [blame] | 42 | #ifdef __32bit_syscall_numbers__ |
| 43 | #define __ARCH_WANT_SYS_IPC |
| 44 | #else |
Stephen Rothwell | 9acee19 | 2008-11-26 00:51:32 -0800 | [diff] [blame] | 45 | #define __ARCH_WANT_COMPAT_SYS_TIME |
| 46 | #define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND |
Catalin Marinas | 8f9c011 | 2012-09-19 12:01:52 +0100 | [diff] [blame] | 47 | #define __ARCH_WANT_COMPAT_SYS_SENDFILE |
Stephen Rothwell | 9acee19 | 2008-11-26 00:51:32 -0800 | [diff] [blame] | 48 | #endif |
| 49 | |
| 50 | /* |
| 51 | * "Conditional" syscalls |
| 52 | * |
| 53 | * What we want is __attribute__((weak,alias("sys_ni_syscall"))), |
| 54 | * but it doesn't work on all toolchains, so we just do it by hand |
| 55 | */ |
| 56 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") |
| 57 | |
Stephen Rothwell | 9acee19 | 2008-11-26 00:51:32 -0800 | [diff] [blame] | 58 | #endif /* _SPARC_UNISTD_H */ |