aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-s390/unistd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-s390/unistd.h')
-rw-r--r--include/asm-s390/unistd.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h
index 41c2792ff6b0..aa7a243862e1 100644
--- a/include/asm-s390/unistd.h
+++ b/include/asm-s390/unistd.h
@@ -392,11 +392,11 @@
392 392
393#endif 393#endif
394 394
395/* user-visible error numbers are in the range -1 - -122: see <asm-s390/errno.h> */ 395#ifdef __KERNEL__
396 396
397#define __syscall_return(type, res) \ 397#define __syscall_return(type, res) \
398do { \ 398do { \
399 if ((unsigned long)(res) >= (unsigned long)(-125)) { \ 399 if ((unsigned long)(res) >= (unsigned long)(-4095)) {\
400 errno = -(res); \ 400 errno = -(res); \
401 res = -1; \ 401 res = -1; \
402 } \ 402 } \
@@ -546,7 +546,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \
546 __syscall_return(type,__res); \ 546 __syscall_return(type,__res); \
547} 547}
548 548
549#ifdef __KERNEL__
550#define __ARCH_WANT_IPC_PARSE_VERSION 549#define __ARCH_WANT_IPC_PARSE_VERSION
551#define __ARCH_WANT_OLD_READDIR 550#define __ARCH_WANT_OLD_READDIR
552#define __ARCH_WANT_SYS_ALARM 551#define __ARCH_WANT_SYS_ALARM
@@ -573,11 +572,9 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \
573# define __ARCH_WANT_COMPAT_SYS_TIME 572# define __ARCH_WANT_COMPAT_SYS_TIME
574# define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND 573# define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
575# endif 574# endif
576#endif
577 575
578#ifdef __KERNEL_SYSCALLS__ 576#ifdef __KERNEL_SYSCALLS__
579 577
580#include <linux/config.h>
581#include <linux/compiler.h> 578#include <linux/compiler.h>
582#include <linux/types.h> 579#include <linux/types.h>
583#include <asm/ptrace.h> 580#include <asm/ptrace.h>
@@ -625,7 +622,7 @@ asmlinkage long sys_rt_sigaction(int sig,
625 struct sigaction __user *oact, 622 struct sigaction __user *oact,
626 size_t sigsetsize); 623 size_t sigsetsize);
627 624
628#endif 625#endif /* __KERNEL_SYSCALLS__ */
629 626
630/* 627/*
631 * "Conditional" syscalls 628 * "Conditional" syscalls
@@ -635,4 +632,5 @@ asmlinkage long sys_rt_sigaction(int sig,
635 */ 632 */
636#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") 633#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall")
637 634
635#endif /* __KERNEL__ */
638#endif /* _ASM_S390_UNISTD_H_ */ 636#endif /* _ASM_S390_UNISTD_H_ */