[PATCH] _syscall6 for 2.6

Franz Sirl Franz.Sirl-ppc at lauterbach.com
Wed Nov 26 00:26:18 EST 2003


At 14:05 25.11.2003, Olaf Hering wrote:

>This patch implements _syscall6 for ppc64, it is required for klibc.

Hi Olaf,

why do we need this in a 2.6 kernel? Can't we call everything directly now
in-kernel? And using this _syscallN stuff in userspace is deprecated AFAIK
and if there was some consensus across architectures, we could remove them
completely.

Franz.



>--- linuxppc64-2.5/include/asm-ppc64/unistd.h   2003-09-12
>13:06:52.000000000 +0200
>+++ linuxppc64-2.5/include/asm-ppc64/unistd.h   2003-11-24
>20:26:02.000000000 +0100
>@@ -287,6 +287,7 @@
>                 register unsigned long __sc_5  __asm__ ("r5");          \
>                 register unsigned long __sc_6  __asm__ ("r6");          \
>                 register unsigned long __sc_7  __asm__ ("r7");          \
>+               register unsigned long __sc_8  __asm__ ("r8");          \
>                                                                         \
>                 __sc_loadargs_##nr(name, args);                         \
>                 __asm__ __volatile__                                    \
>@@ -295,10 +296,10 @@
>                         : "=&r" (__sc_0),                               \
>                           "=&r" (__sc_3),  "=&r" (__sc_4),              \
>                           "=&r" (__sc_5),  "=&r" (__sc_6),              \
>-                         "=&r" (__sc_7)                                \
>+                         "=&r" (__sc_7),  "=&r" (__sc_8)               \
>                         : __sc_asm_input_##nr                           \
>                         : "cr0", "ctr", "memory",                       \
>-                         "r8", "r9", "r10","r11", "r12");              \
>+                               "r9", "r10","r11", "r12");              \
>                 __sc_ret = __sc_3;                                      \
>                 __sc_err = __sc_0;                                      \
>         }                                                               \
>@@ -326,6 +327,9 @@
>  #define __sc_loadargs_5(name, arg1, arg2, arg3, arg4, arg5)            \
>         __sc_loadargs_4(name, arg1, arg2, arg3, arg4);                  \
>         __sc_7 = (unsigned long) (arg5)
>+#define __sc_loadargs_6(name, arg1, arg2, arg3, arg4, arg5, arg6)      \
>+       __sc_loadargs_5(name, arg1, arg2, arg3, arg4, arg5);            \
>+       __sc_8 = (unsigned long) (arg6)
>
>  #define __sc_asm_input_0 "0" (__sc_0)
>  #define __sc_asm_input_1 __sc_asm_input_0, "1" (__sc_3)
>@@ -333,6 +337,7 @@
>  #define __sc_asm_input_3 __sc_asm_input_2, "3" (__sc_5)
>  #define __sc_asm_input_4 __sc_asm_input_3, "4" (__sc_6)
>  #define __sc_asm_input_5 __sc_asm_input_4, "5" (__sc_7)
>+#define __sc_asm_input_6 __sc_asm_input_5, "6" (__sc_8)
>
>  #define _syscall0(type,name)                                           \
>  type
> name(void)                                                                \
>@@ -369,6 +374,11 @@ type name(type1 arg1, type2 arg2, type3
>  {                                                                      \
>         __syscall_nr(5, type, name, arg1, arg2, arg3, arg4, arg5);      \
>  }
>+#define
>_syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6)
>\
>+type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5,
>type6 arg6)      \
>+{                                                                      \
>+       __syscall_nr(6, type, name, arg1, arg2, arg3, arg4, arg5,
>arg6);        \
>+}
>
>  #ifdef __KERNEL_SYSCALLS__
>
>--
>USB is for mice, FireWire is for men!
>
>sUse lINUX ag, nÃœRNBERG
>


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list