]> err.no Git - linux-2.6/blobdiff - include/asm-s390/unistd.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6
[linux-2.6] / include / asm-s390 / unistd.h
index d49c54cb5505a03d8ee8920af9e2d08f662bbffd..0cccfd83c45758e7b9d367442efcb6094567ba7a 100644 (file)
@@ -355,145 +355,145 @@ do {                                                         \
 
 #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 _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 _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 _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 _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 _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 _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
@@ -523,57 +523,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
  *