Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[powerpc.git] / include / asm-s390 / unistd.h
index 0361ac5..fb6fef9 100644 (file)
 #define __NR_sync_file_range   307
 #define __NR_tee               308
 #define __NR_vmsplice          309
+/* Number 310 is reserved for new sys_move_pages */
+#define __NR_getcpu            311
+#define __NR_epoll_pwait       312
 
-#define NR_syscalls 310
+#define NR_syscalls 313
 
 /* 
  * There are some system calls that are not present on 64 bit, some
 
 #ifdef __KERNEL__
 
-#include <linux/err.h>
-
-#define __syscall_return(type, res)                         \
-do {                                                        \
-       if ((unsigned long)(res) >= (unsigned long)(-MAX_ERRNO)) { \
-               errno = -(res);                              \
-               res = -1;                                    \
-       }                                                    \
-       return (type) (res);                                 \
-} while (0)
-
-#define _svc_clobber "1", "cc", "memory"
-
-#define _syscall0(type,name)                                   \
-type name(void) {                                              \
-       register long __svcres asm("2");                        \
-       long __res;                                             \
-       asm volatile(                                           \
-               "       .if     %1 < 256\n"                     \
-               "       svc     %b1\n"                          \
-               "       .else\n"                                \
-               "       la      %%r1,%1\n"                      \
-               "       svc     0\n"                            \
-               "       .endif"                                 \
-               : "=d" (__svcres)                               \
-               : "i" (__NR_##name)                             \
-               : _svc_clobber);                                \
-       __res = __svcres;                                       \
-       __syscall_return(type,__res);                           \
-}
-
-#define _syscall1(type,name,type1,arg1)                                \
-type name(type1 arg1) {                                                \
-       register type1 __arg1 asm("2") = arg1;                  \
-       register long __svcres asm("2");                        \
-       long __res;                                             \
-       asm volatile(                                           \
-               "       .if     %1 < 256\n"                     \
-               "       svc     %b1\n"                          \
-               "       .else\n"                                \
-               "       la      %%r1,%1\n"                      \
-               "       svc     0\n"                            \
-               "       .endif"                                 \
-               : "=d" (__svcres)                               \
-               : "i" (__NR_##name),                            \
-                 "0" (__arg1)                                  \
-               : _svc_clobber);                                \
-       __res = __svcres;                                       \
-       __syscall_return(type,__res);                           \
-}
-
-#define _syscall2(type,name,type1,arg1,type2,arg2)             \
-type name(type1 arg1, type2 arg2) {                            \
-       register type1 __arg1 asm("2") = arg1;                  \
-       register type2 __arg2 asm("3") = arg2;                  \
-       register long __svcres asm("2");                        \
-       long __res;                                             \
-       asm volatile(                                           \
-               "       .if     %1 < 256\n"                     \
-               "       svc     %b1\n"                          \
-               "       .else\n"                                \
-               "       la      %%r1,%1\n"                      \
-               "       svc     0\n"                            \
-               "       .endif"                                 \
-               : "=d" (__svcres)                               \
-               : "i" (__NR_##name),                            \
-                 "0" (__arg1),                                 \
-                 "d" (__arg2)                                  \
-               : _svc_clobber );                               \
-       __res = __svcres;                                       \
-       __syscall_return(type,__res);                           \
-}
-
-#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3)  \
-type name(type1 arg1, type2 arg2, type3 arg3) {                        \
-       register type1 __arg1 asm("2") = arg1;                  \
-       register type2 __arg2 asm("3") = arg2;                  \
-       register type3 __arg3 asm("4") = arg3;                  \
-       register long __svcres asm("2");                        \
-       long __res;                                             \
-       asm volatile(                                           \
-               "       .if     %1 < 256\n"                     \
-               "       svc     %b1\n"                          \
-               "       .else\n"                                \
-               "       la      %%r1,%1\n"                      \
-               "       svc     0\n"                            \
-               "       .endif"                                 \
-               : "=d" (__svcres)                               \
-               : "i" (__NR_##name),                            \
-                 "0" (__arg1),                                 \
-                 "d" (__arg2),                                 \
-                 "d" (__arg3)                                  \
-               : _svc_clobber);                                \
-       __res = __svcres;                                       \
-       __syscall_return(type,__res);                           \
-}
-
-#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,  \
-                 type4,name4)                                  \
-type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) {    \
-       register type1 __arg1 asm("2") = arg1;                  \
-       register type2 __arg2 asm("3") = arg2;                  \
-       register type3 __arg3 asm("4") = arg3;                  \
-       register type4 __arg4 asm("5") = arg4;                  \
-       register long __svcres asm("2");                        \
-       long __res;                                             \
-       asm volatile(                                           \
-               "       .if     %1 < 256\n"                     \
-               "       svc     %b1\n"                          \
-               "       .else\n"                                \
-               "       la      %%r1,%1\n"                      \
-               "       svc     0\n"                            \
-               "       .endif"                                 \
-               : "=d" (__svcres)                               \
-               : "i" (__NR_##name),                            \
-                 "0" (__arg1),                                 \
-                 "d" (__arg2),                                 \
-                 "d" (__arg3),                                 \
-                 "d" (__arg4)                                  \
-               : _svc_clobber);                                \
-       __res = __svcres;                                       \
-       __syscall_return(type,__res);                           \
-}
-
-#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,  \
-                 type4,name4,type5,name5)                      \
-type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4,      \
-         type5 arg5) {                                         \
-       register type1 __arg1 asm("2") = arg1;                  \
-       register type2 __arg2 asm("3") = arg2;                  \
-       register type3 __arg3 asm("4") = arg3;                  \
-       register type4 __arg4 asm("5") = arg4;                  \
-       register type5 __arg5 asm("6") = arg5;                  \
-       register long __svcres asm("2");                        \
-       long __res;                                             \
-       asm volatile(                                           \
-               "       .if     %1 < 256\n"                     \
-               "       svc     %b1\n"                          \
-               "       .else\n"                                \
-               "       la      %%r1,%1\n"                      \
-               "       svc     0\n"                            \
-               "       .endif"                                 \
-               : "=d" (__svcres)                               \
-               : "i" (__NR_##name),                            \
-                 "0" (__arg1),                                 \
-                 "d" (__arg2),                                 \
-                 "d" (__arg3),                                 \
-                 "d" (__arg4),                                 \
-                 "d" (__arg5)                                  \
-               : _svc_clobber);                                \
-       __res = __svcres;                                       \
-       __syscall_return(type,__res);                           \
-}
-
 #define __ARCH_WANT_IPC_PARSE_VERSION
 #define __ARCH_WANT_OLD_READDIR
 #define __ARCH_WANT_SYS_ALARM
@@ -523,57 +372,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4,  \
 #   define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
 # endif
 
-#ifdef __KERNEL_SYSCALLS__
-
-#include <linux/compiler.h>
-#include <linux/types.h>
-#include <asm/ptrace.h>
-#include <asm/stat.h>
-#include <linux/syscalls.h>
-
-/*
- * we need this inline - forking from kernel space will result
- * in NO COPY ON WRITE (!!!), until an execve is executed. This
- * is no problem, but for the stack. This is handled by not letting
- * main() use the stack at all after fork(). Thus, no function
- * calls - which means inline code for fork too, as otherwise we
- * would use the stack upon exit from 'fork()'.
- *
- * Actually only pause and fork are needed inline, so that there
- * won't be any messing with the stack from main(), but we define
- * some others too.
- */
-#define __NR__exit __NR_exit
-static inline _syscall0(pid_t,setsid)
-static inline _syscall3(int,write,int,fd,const char *,buf,off_t,count)
-static inline _syscall3(int,read,int,fd,char *,buf,off_t,count)
-static inline _syscall3(off_t,lseek,int,fd,off_t,offset,int,count)
-static inline _syscall1(int,dup,int,fd)
-static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp)
-static inline _syscall3(int,open,const char *,file,int,flag,int,mode)
-static inline _syscall1(int,close,int,fd)
-static inline _syscall2(long,stat,char *,filename,struct stat *,statbuf)
-
-static inline pid_t waitpid(int pid, int *wait_stat, int flags)
-{
-       return sys_wait4(pid, wait_stat, flags, NULL);
-}
-struct mmap_arg_struct;
-asmlinkage long sys_mmap2(struct mmap_arg_struct __user *arg);
-
-asmlinkage long sys_execve(struct pt_regs regs);
-asmlinkage long sys_clone(struct pt_regs regs);
-asmlinkage long sys_fork(struct pt_regs regs);
-asmlinkage long sys_vfork(struct pt_regs regs);
-asmlinkage long sys_pipe(unsigned long __user *fildes);
-struct sigaction;
-asmlinkage long sys_rt_sigaction(int sig,
-                               const struct sigaction __user *act,
-                               struct sigaction __user *oact,
-                               size_t sigsetsize);
-
-#endif /* __KERNEL_SYSCALLS__ */
-
 /*
  * "Conditional" syscalls
  *