aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-xtensa
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-xtensa')
-rw-r--r--include/asm-xtensa/unistd.h21
1 files changed, 3 insertions, 18 deletions
diff --git a/include/asm-xtensa/unistd.h b/include/asm-xtensa/unistd.h
index 6b39d6609d9c..5e1b99dc4ab3 100644
--- a/include/asm-xtensa/unistd.h
+++ b/include/asm-xtensa/unistd.h
@@ -11,8 +11,6 @@
11#ifndef _XTENSA_UNISTD_H 11#ifndef _XTENSA_UNISTD_H
12#define _XTENSA_UNISTD_H 12#define _XTENSA_UNISTD_H
13 13
14#include <linux/linkage.h>
15
16#define __NR_spill 0 14#define __NR_spill 0
17#define __NR_exit 1 15#define __NR_exit 1
18#define __NR_read 3 16#define __NR_read 3
@@ -221,21 +219,9 @@
221#define SYSXTENSA_COUNT 5 /* count of syscall0 functions*/ 219#define SYSXTENSA_COUNT 5 /* count of syscall0 functions*/
222 220
223#ifdef __KERNEL__ 221#ifdef __KERNEL__
224#define __syscall_return(type, res) return ((type)(res)) 222#include <linux/linkage.h>
225#else
226#define __syscall_return(type, res) \
227do { \
228 if ((unsigned long)(res) >= (unsigned long)(-125)) { \
229 /* Avoid using "res" which is declared to be in register r2; \
230 * errno might expand to a function call and clobber it. */ \
231 int __err = -(res); \
232 errno = __err; \
233 res = -1; \
234 } \
235 return (type) (res); \
236} while (0)
237#endif
238 223
224#define __syscall_return(type, res) return ((type)(res))
239 225
240/* Tensilica's xt-xcc compiler is much more agressive at code 226/* Tensilica's xt-xcc compiler is much more agressive at code
241 * optimization than gcc. Multiple __asm__ statements are 227 * optimization than gcc. Multiple __asm__ statements are
@@ -429,11 +415,10 @@ static __inline__ _syscall3(int,execve,const char*,file,char**,argv,char**,envp)
429 */ 415 */
430#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall"); 416#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall");
431 417
432#ifdef __KERNEL__
433#define __ARCH_WANT_STAT64 418#define __ARCH_WANT_STAT64
434#define __ARCH_WANT_SYS_UTIME 419#define __ARCH_WANT_SYS_UTIME
435#define __ARCH_WANT_SYS_LLSEEK 420#define __ARCH_WANT_SYS_LLSEEK
436#define __ARCH_WANT_SYS_RT_SIGACTION 421#define __ARCH_WANT_SYS_RT_SIGACTION
437#endif 422#endif /* __KERNEL__ */
438 423
439#endif /* _XTENSA_UNISTD_H */ 424#endif /* _XTENSA_UNISTD_H */