Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/thorpej-futex]: src/sys/compat/linux32/arch/amd64 Regen for preadv(2) an...



details:   https://anonhg.NetBSD.org/src/rev/bbdbe499e33f
branches:  thorpej-futex
changeset: 949158:bbdbe499e33f
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Jan 03 16:13:07 2021 +0000

description:
Regen for preadv(2) and pwritev(2).

diffstat:

 sys/compat/linux32/arch/amd64/linux32_syscall.h       |   8 +-
 sys/compat/linux32/arch/amd64/linux32_syscallargs.h   |  24 +++++-
 sys/compat/linux32/arch/amd64/linux32_syscalls.c      |  12 +-
 sys/compat/linux32/arch/amd64/linux32_sysent.c        |  14 +-
 sys/compat/linux32/arch/amd64/linux32_systrace_args.c |  78 ++++++++++++++++++-
 5 files changed, 121 insertions(+), 15 deletions(-)

diffs (247 lines):

diff -r 1391be45bd37 -r bbdbe499e33f sys/compat/linux32/arch/amd64/linux32_syscall.h
--- a/sys/compat/linux32/arch/amd64/linux32_syscall.h   Sun Jan 03 16:12:43 2021 +0000
+++ b/sys/compat/linux32/arch/amd64/linux32_syscall.h   Sun Jan 03 16:13:07 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_syscall.h,v 1.81.2.2 2020/12/17 03:05:50 thorpej Exp $ */
+/* $NetBSD: linux32_syscall.h,v 1.81.2.3 2021/01/03 16:13:07 thorpej Exp $ */
 
 /*
  * System call numbers.
@@ -741,6 +741,12 @@
 /* syscall: "pipe2" ret: "int" args: "netbsd32_intp" "int" */
 #define        LINUX32_SYS_pipe2       331
 
+/* syscall: "preadv" ret: "int" args: "int" "const netbsd32_iovecp_t" "int" "netbsd32_u_long" "netbsd32_u_long" */
+#define        LINUX32_SYS_preadv      333
+
+/* syscall: "pwritev" ret: "int" args: "int" "const netbsd32_iovecp_t" "int" "netbsd32_u_long" "netbsd32_u_long" */
+#define        LINUX32_SYS_pwritev     334
+
 #define        LINUX32_SYS_MAXSYSCALL  351
 #define        LINUX32_SYS_NSYSENT     512
 #endif /* _LINUX32_SYS_SYSCALL_H_ */
diff -r 1391be45bd37 -r bbdbe499e33f sys/compat/linux32/arch/amd64/linux32_syscallargs.h
--- a/sys/compat/linux32/arch/amd64/linux32_syscallargs.h       Sun Jan 03 16:12:43 2021 +0000
+++ b/sys/compat/linux32/arch/amd64/linux32_syscallargs.h       Sun Jan 03 16:13:07 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_syscallargs.h,v 1.81.2.2 2020/12/17 03:05:50 thorpej Exp $ */
+/* $NetBSD: linux32_syscallargs.h,v 1.81.2.3 2021/01/03 16:13:07 thorpej Exp $ */
 
 /*
  * System call argument lists.
@@ -1077,6 +1077,24 @@
 };
 check_syscall_args(linux32_sys_pipe2)
 
+struct linux32_sys_preadv_args {
+       syscallarg(int) fd;
+       syscallarg(const netbsd32_iovecp_t) iovp;
+       syscallarg(int) iovcnt;
+       syscallarg(netbsd32_u_long) off_lo;
+       syscallarg(netbsd32_u_long) off_hi;
+};
+check_syscall_args(linux32_sys_preadv)
+
+struct linux32_sys_pwritev_args {
+       syscallarg(int) fd;
+       syscallarg(const netbsd32_iovecp_t) iovp;
+       syscallarg(int) iovcnt;
+       syscallarg(netbsd32_u_long) off_lo;
+       syscallarg(netbsd32_u_long) off_hi;
+};
+check_syscall_args(linux32_sys_pwritev)
+
 /*
  * System call prototypes.
  */
@@ -1545,4 +1563,8 @@
 
 int    linux32_sys_pipe2(struct lwp *, const struct linux32_sys_pipe2_args *, register_t *);
 
+int    linux32_sys_preadv(struct lwp *, const struct linux32_sys_preadv_args *, register_t *);
+
+int    linux32_sys_pwritev(struct lwp *, const struct linux32_sys_pwritev_args *, register_t *);
+
 #endif /* _LINUX32_SYS_SYSCALLARGS_H_ */
diff -r 1391be45bd37 -r bbdbe499e33f sys/compat/linux32/arch/amd64/linux32_syscalls.c
--- a/sys/compat/linux32/arch/amd64/linux32_syscalls.c  Sun Jan 03 16:12:43 2021 +0000
+++ b/sys/compat/linux32/arch/amd64/linux32_syscalls.c  Sun Jan 03 16:13:07 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_syscalls.c,v 1.81.2.2 2020/12/17 03:05:50 thorpej Exp $ */
+/* $NetBSD: linux32_syscalls.c,v 1.81.2.3 2021/01/03 16:13:07 thorpej Exp $ */
 
 /*
  * System call names.
@@ -8,7 +8,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.81.2.2 2020/12/17 03:05:50 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.81.2.3 2021/01/03 16:13:07 thorpej Exp $");
 
 #if defined(_KERNEL_OPT)
 #include <sys/param.h>
@@ -372,8 +372,8 @@
        /* 330 */       "dup3",
        /* 331 */       "pipe2",
        /* 332 */       "#332 (unimplemented inotify_init1)",
-       /* 333 */       "#333 (unimplemented preadv)",
-       /* 334 */       "#334 (unimplemented pwritev)",
+       /* 333 */       "preadv",
+       /* 334 */       "pwritev",
        /* 335 */       "#335 (unimplemented rt_tgsigqueueinfo)",
        /* 336 */       "#336 (unimplemented perf_counter_open)",
        /* 337 */       "#337 (unimplemented recvmmsg)",
@@ -891,8 +891,8 @@
        /* 330 */       NULL, /* dup3 */
        /* 331 */       NULL, /* pipe2 */
        /* 332 */       NULL, /* unimplemented inotify_init1 */
-       /* 333 */       NULL, /* unimplemented preadv */
-       /* 334 */       NULL, /* unimplemented pwritev */
+       /* 333 */       NULL, /* preadv */
+       /* 334 */       NULL, /* pwritev */
        /* 335 */       NULL, /* unimplemented rt_tgsigqueueinfo */
        /* 336 */       NULL, /* unimplemented perf_counter_open */
        /* 337 */       NULL, /* unimplemented recvmmsg */
diff -r 1391be45bd37 -r bbdbe499e33f sys/compat/linux32/arch/amd64/linux32_sysent.c
--- a/sys/compat/linux32/arch/amd64/linux32_sysent.c    Sun Jan 03 16:12:43 2021 +0000
+++ b/sys/compat/linux32/arch/amd64/linux32_sysent.c    Sun Jan 03 16:13:07 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_sysent.c,v 1.81.2.2 2020/12/17 03:05:50 thorpej Exp $ */
+/* $NetBSD: linux32_sysent.c,v 1.81.2.3 2021/01/03 16:13:07 thorpej Exp $ */
 
 /*
  * System call switch table.
@@ -8,7 +8,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_sysent.c,v 1.81.2.2 2020/12/17 03:05:50 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_sysent.c,v 1.81.2.3 2021/01/03 16:13:07 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/poll.h>
@@ -1265,11 +1265,13 @@
                .sy_call = linux_sys_nosys,
        },              /* 332 = filler */
        {
-               .sy_call = linux_sys_nosys,
-       },              /* 333 = filler */
+               ns(struct linux32_sys_preadv_args),
+               .sy_call = (sy_call_t *)linux32_sys_preadv
+       },              /* 333 = preadv */
        {
-               .sy_call = linux_sys_nosys,
-       },              /* 334 = filler */
+               ns(struct linux32_sys_pwritev_args),
+               .sy_call = (sy_call_t *)linux32_sys_pwritev
+       },              /* 334 = pwritev */
        {
                .sy_call = linux_sys_nosys,
        },              /* 335 = filler */
diff -r 1391be45bd37 -r bbdbe499e33f sys/compat/linux32/arch/amd64/linux32_systrace_args.c
--- a/sys/compat/linux32/arch/amd64/linux32_systrace_args.c     Sun Jan 03 16:12:43 2021 +0000
+++ b/sys/compat/linux32/arch/amd64/linux32_systrace_args.c     Sun Jan 03 16:13:07 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_systrace_args.c,v 1.8.2.2 2020/12/17 03:05:50 thorpej Exp $ */
+/* $NetBSD: linux32_systrace_args.c,v 1.8.2.3 2021/01/03 16:13:07 thorpej Exp $ */
 
 /*
  * System call argument to DTrace register array converstion.
@@ -1956,6 +1956,28 @@
                *n_args = 2;
                break;
        }
+       /* linux32_sys_preadv */
+       case 333: {
+               const struct linux32_sys_preadv_args *p = params;
+               iarg[0] = SCARG(p, fd); /* int */
+               uarg[1] = (intptr_t) SCARG(p, iovp).i32; /* const netbsd32_iovecp_t */
+               iarg[2] = SCARG(p, iovcnt); /* int */
+               iarg[3] = SCARG(p, off_lo); /* netbsd32_u_long */
+               iarg[4] = SCARG(p, off_hi); /* netbsd32_u_long */
+               *n_args = 5;
+               break;
+       }
+       /* linux32_sys_pwritev */
+       case 334: {
+               const struct linux32_sys_pwritev_args *p = params;
+               iarg[0] = SCARG(p, fd); /* int */
+               uarg[1] = (intptr_t) SCARG(p, iovp).i32; /* const netbsd32_iovecp_t */
+               iarg[2] = SCARG(p, iovcnt); /* int */
+               iarg[3] = SCARG(p, off_lo); /* netbsd32_u_long */
+               iarg[4] = SCARG(p, off_hi); /* netbsd32_u_long */
+               *n_args = 5;
+               break;
+       }
        default:
                *n_args = 0;
                break;
@@ -5144,6 +5166,50 @@
                        break;
                };
                break;
+       /* linux32_sys_preadv */
+       case 333:
+               switch(ndx) {
+               case 0:
+                       p = "int";
+                       break;
+               case 1:
+                       p = "const netbsd32_iovecp_t";
+                       break;
+               case 2:
+                       p = "int";
+                       break;
+               case 3:
+                       p = "netbsd32_u_long";
+                       break;
+               case 4:
+                       p = "netbsd32_u_long";
+                       break;
+               default:
+                       break;
+               };
+               break;
+       /* linux32_sys_pwritev */
+       case 334:
+               switch(ndx) {
+               case 0:
+                       p = "int";
+                       break;
+               case 1:
+                       p = "const netbsd32_iovecp_t";
+                       break;
+               case 2:
+                       p = "int";
+                       break;
+               case 3:
+                       p = "netbsd32_u_long";
+                       break;
+               case 4:
+                       p = "netbsd32_u_long";
+                       break;
+               default:
+                       break;
+               };
+               break;
        default:
                break;
        };
@@ -6289,6 +6355,16 @@
                if (ndx == 0 || ndx == 1)
                        p = "int";
                break;
+       /* linux32_sys_preadv */
+       case 333:
+               if (ndx == 0 || ndx == 1)
+                       p = "int";
+               break;
+       /* linux32_sys_pwritev */
+       case 334:
+               if (ndx == 0 || ndx == 1)
+                       p = "int";
+               break;
        default:
                break;
        };



Home | Main Index | Thread Index | Old Index