The branch main has been updated by dchagin:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=9e07ae7a096742018aafb7e29ddf5c4cac8c1e7e

commit 9e07ae7a096742018aafb7e29ddf5c4cac8c1e7e
Author:     Dmitry Chagin <[email protected]>
AuthorDate: 2021-06-07 02:08:11 +0000
Commit:     Dmitry Chagin <[email protected]>
CommitDate: 2021-06-07 02:08:11 +0000

    Regen for ('99b6f430698fa00a33184dd61591d8b6518ed9d3') Linux
    clock_gettime64 system call.
    
    MFC after:      2 weeks
---
 sys/amd64/linux32/linux32_proto.h         |  3 ++-
 sys/amd64/linux32/linux32_sysent.c        |  2 +-
 sys/amd64/linux32/linux32_systrace_args.c | 18 +++++++++++++++++-
 sys/i386/linux/linux_proto.h              |  3 ++-
 sys/i386/linux/linux_sysent.c             |  2 +-
 sys/i386/linux/linux_systrace_args.c      | 18 +++++++++++++++++-
 6 files changed, 40 insertions(+), 6 deletions(-)

diff --git a/sys/amd64/linux32/linux32_proto.h 
b/sys/amd64/linux32/linux32_proto.h
index 8d2f74d3f04c..b1cd97ee6e74 100644
--- a/sys/amd64/linux32/linux32_proto.h
+++ b/sys/amd64/linux32/linux32_proto.h
@@ -1519,7 +1519,8 @@ struct linux_msgctl_args {
        char buf_l_[PADL_(struct l_msqid_ds *)]; struct l_msqid_ds * buf; char 
buf_r_[PADR_(struct l_msqid_ds *)];
 };
 struct linux_clock_gettime64_args {
-       register_t dummy;
+       char which_l_[PADL_(clockid_t)]; clockid_t which; char 
which_r_[PADR_(clockid_t)];
+       char tp_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * tp; 
char tp_r_[PADR_(struct l_timespec64 *)];
 };
 struct linux_clock_settime64_args {
        register_t dummy;
diff --git a/sys/amd64/linux32/linux32_sysent.c 
b/sys/amd64/linux32/linux32_sysent.c
index da751f94b5e6..c1d92dc14299 100644
--- a/sys/amd64/linux32/linux32_sysent.c
+++ b/sys/amd64/linux32/linux32_sysent.c
@@ -420,7 +420,7 @@ struct sysent linux32_sysent[] = {
        { .sy_narg = AS(linux_msgsnd_args), .sy_call = (sy_call_t 
*)linux_msgsnd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = 
SY_THR_STATIC },  /* 400 = linux_msgsnd */
        { .sy_narg = AS(linux_msgrcv_args), .sy_call = (sy_call_t 
*)linux_msgrcv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = 
SY_THR_STATIC },  /* 401 = linux_msgrcv */
        { .sy_narg = AS(linux_msgctl_args), .sy_call = (sy_call_t 
*)linux_msgctl, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = 
SY_THR_STATIC },  /* 402 = linux_msgctl */
-       { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clock_gettime64, 
.sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },     /* 403 
= linux_clock_gettime64 */
+       { .sy_narg = AS(linux_clock_gettime64_args), .sy_call = (sy_call_t 
*)linux_clock_gettime64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = 
SY_THR_STATIC },        /* 403 = linux_clock_gettime64 */
        { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clock_settime64, 
.sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },     /* 404 
= linux_clock_settime64 */
        { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clock_adjtime64, 
.sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },     /* 405 
= linux_clock_adjtime64 */
        { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clock_getres_time64, 
.sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 406 = 
linux_clock_getres_time64 */
diff --git a/sys/amd64/linux32/linux32_systrace_args.c 
b/sys/amd64/linux32/linux32_systrace_args.c
index 4d6a54e37e11..4c5c8a65c2b3 100644
--- a/sys/amd64/linux32/linux32_systrace_args.c
+++ b/sys/amd64/linux32/linux32_systrace_args.c
@@ -2962,7 +2962,10 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, 
int *n_args)
        }
        /* linux_clock_gettime64 */
        case 403: {
-               *n_args = 0;
+               struct linux_clock_gettime64_args *p = params;
+               iarg[0] = p->which; /* clockid_t */
+               uarg[1] = (intptr_t)p->tp; /* struct l_timespec64 * */
+               *n_args = 2;
                break;
        }
        /* linux_clock_settime64 */
@@ -7991,6 +7994,16 @@ systrace_entry_setargdesc(int sysnum, int ndx, char 
*desc, size_t descsz)
                break;
        /* linux_clock_gettime64 */
        case 403:
+               switch (ndx) {
+               case 0:
+                       p = "clockid_t";
+                       break;
+               case 1:
+                       p = "userland struct l_timespec64 *";
+                       break;
+               default:
+                       break;
+               };
                break;
        /* linux_clock_settime64 */
        case 404:
@@ -9777,6 +9790,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char 
*desc, size_t descsz)
                break;
        /* linux_clock_gettime64 */
        case 403:
+               if (ndx == 0 || ndx == 1)
+                       p = "int";
+               break;
        /* linux_clock_settime64 */
        case 404:
        /* linux_clock_adjtime64 */
diff --git a/sys/i386/linux/linux_proto.h b/sys/i386/linux/linux_proto.h
index 1a963a49aecd..6adcdcc08f14 100644
--- a/sys/i386/linux/linux_proto.h
+++ b/sys/i386/linux/linux_proto.h
@@ -1512,7 +1512,8 @@ struct linux_msgctl_args {
        char buf_l_[PADL_(struct l_msqid_ds *)]; struct l_msqid_ds * buf; char 
buf_r_[PADR_(struct l_msqid_ds *)];
 };
 struct linux_clock_gettime64_args {
-       register_t dummy;
+       char which_l_[PADL_(clockid_t)]; clockid_t which; char 
which_r_[PADR_(clockid_t)];
+       char tp_l_[PADL_(struct l_timespec64 *)]; struct l_timespec64 * tp; 
char tp_r_[PADR_(struct l_timespec64 *)];
 };
 struct linux_clock_settime64_args {
        register_t dummy;
diff --git a/sys/i386/linux/linux_sysent.c b/sys/i386/linux/linux_sysent.c
index bb9280580dde..c62a5921100d 100644
--- a/sys/i386/linux/linux_sysent.c
+++ b/sys/i386/linux/linux_sysent.c
@@ -420,7 +420,7 @@ struct sysent linux_sysent[] = {
        { .sy_narg = AS(linux_msgsnd_args), .sy_call = (sy_call_t 
*)linux_msgsnd, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = 
SY_THR_STATIC },  /* 400 = linux_msgsnd */
        { .sy_narg = AS(linux_msgrcv_args), .sy_call = (sy_call_t 
*)linux_msgrcv, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = 
SY_THR_STATIC },  /* 401 = linux_msgrcv */
        { .sy_narg = AS(linux_msgctl_args), .sy_call = (sy_call_t 
*)linux_msgctl, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = 
SY_THR_STATIC },  /* 402 = linux_msgctl */
-       { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clock_gettime64, 
.sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },     /* 403 
= linux_clock_gettime64 */
+       { .sy_narg = AS(linux_clock_gettime64_args), .sy_call = (sy_call_t 
*)linux_clock_gettime64, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = 
SY_THR_STATIC },        /* 403 = linux_clock_gettime64 */
        { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clock_settime64, 
.sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },     /* 404 
= linux_clock_settime64 */
        { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clock_adjtime64, 
.sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC },     /* 405 
= linux_clock_adjtime64 */
        { .sy_narg = 0, .sy_call = (sy_call_t *)linux_clock_getres_time64, 
.sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 406 = 
linux_clock_getres_time64 */
diff --git a/sys/i386/linux/linux_systrace_args.c 
b/sys/i386/linux/linux_systrace_args.c
index 91aa3a9a13eb..dc07c0d135b2 100644
--- a/sys/i386/linux/linux_systrace_args.c
+++ b/sys/i386/linux/linux_systrace_args.c
@@ -3001,7 +3001,10 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, 
int *n_args)
        }
        /* linux_clock_gettime64 */
        case 403: {
-               *n_args = 0;
+               struct linux_clock_gettime64_args *p = params;
+               iarg[0] = p->which; /* clockid_t */
+               uarg[1] = (intptr_t)p->tp; /* struct l_timespec64 * */
+               *n_args = 2;
                break;
        }
        /* linux_clock_settime64 */
@@ -8068,6 +8071,16 @@ systrace_entry_setargdesc(int sysnum, int ndx, char 
*desc, size_t descsz)
                break;
        /* linux_clock_gettime64 */
        case 403:
+               switch (ndx) {
+               case 0:
+                       p = "clockid_t";
+                       break;
+               case 1:
+                       p = "userland struct l_timespec64 *";
+                       break;
+               default:
+                       break;
+               };
                break;
        /* linux_clock_settime64 */
        case 404:
@@ -9883,6 +9896,9 @@ systrace_return_setargdesc(int sysnum, int ndx, char 
*desc, size_t descsz)
                break;
        /* linux_clock_gettime64 */
        case 403:
+               if (ndx == 0 || ndx == 1)
+                       p = "int";
+               break;
        /* linux_clock_settime64 */
        case 404:
        /* linux_clock_adjtime64 */
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "[email protected]"

Reply via email to