From nobody Thu Oct 26 19:07:50 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGb0R4Lr6z4y9qD; Thu, 26 Oct 2023 19:07:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SGb0Q4qLLz3LlC; Thu, 26 Oct 2023 19:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698347270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/gJnI3uIG92yx17uHM8enDkbK914L9Xn7Pn8jGmhadQ=; b=lWpE5n9tS/fw9iJEJ6TbvpVGt0bFd/BQXm9nWvHRbOZoB9ZAUxy77S27QoIU4GrIwQ7JZT T15UgnSpcMxm/b3jJl0gfCwl/aDFpjNpXSSub5ln8fIw5hSQ+TNGxuhpQzgWwtXN9WhODr e56SqDl0FOVKva5cbubxC3oj2DzKHUMvVEWt8+E0lcAqTe0J75HrnQ7JjzI8W9KyZZtWgG Q/qfufA4BkLkmsH/ZSgZj05EYx7+ifWvI44aQZvCgRdV7RqitOoXtSE+hy1iAVVJEkEVju sDfE9/oNSQOVd2Bwd3pQzYnFSU/zKuTIW7M+YBFel7AgrCedyJV23NYtis54rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698347270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/gJnI3uIG92yx17uHM8enDkbK914L9Xn7Pn8jGmhadQ=; b=UtbT+BrdJm+mxM7Fe2aIz9N2XWnbwfyM51QJM7XVMDTZBqmRa5mCikV0zAWu0B+XN4pK/o k7EHPwyXM2/r7DPLPomWJwe32TOIWmWMBRkoOAf5d0/lC+OgdZew20PwAO5htvzU2a3OG3 BTT9xi9PeWscgQYLB93i+UyMrIDgbnPNKFOHcIeMrELAW01kzx30es3pHqfAp9Ou/vGyDz Ujq15JFa/g0Mj5YTQn3crDzO56YvpLUBxLJmKPDQt+ms+BIB5N9btgqTy/ZNCVvCS93t1A npuvKKgp0hmU4pN9Y8TIvp7q0G8kIG7Xg18i7kRm2vkRwN8Yn0ItTTQjxlvm6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698347270; a=rsa-sha256; cv=none; b=Z+lcwCOTCmWcwSsfnzekFa53mgloi/HbyDmBAqvLLBwCGRhxn/ZOt8RbICsmCCcZVp1SR4 Aa+ysbfQvyrMGxjWwens6RqP/Crtz3s7tO25yoVa94HR6zeGvV2vDYjNLLO+7rUcOJdMUy 4mswnl/ukoEjFagxWgK/vO6WnG7kiNy6PRHMGc1xlI5aF62mBFQabX77mvR58IMEauV7Pv b6GWsXUH3OHoTnfCbS739WSeUShQxwkHVQBH5Zxhip57CXNxtQ51fi3rkd1xT1BrhXV9h+ RDaQu3Dlp/JT8igyp/o1fID+jJOXh1LKdccl7QNnN4Vej2yIXPHAg107r+SNNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGb0Q23RHzjyd; Thu, 26 Oct 2023 19:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QJ7o6U041123; Thu, 26 Oct 2023 19:07:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QJ7oKL041120; Thu, 26 Oct 2023 19:07:50 GMT (envelope-from git) Date: Thu, 26 Oct 2023 19:07:50 GMT Message-Id: <202310261907.39QJ7oKL041120@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 0437db781b7c - stable/13 - Regen List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0437db781b7cf3b011665d0e21b9a035ab3e0272 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0437db781b7cf3b011665d0e21b9a035ab3e0272 commit 0437db781b7cf3b011665d0e21b9a035ab3e0272 Author: Konstantin Belousov AuthorDate: 2023-10-26 04:06:56 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-26 04:07:29 +0000 Regen --- sys/kern/init_sysent.c | 1 + sys/kern/syscalls.c | 1 + sys/kern/systrace_args.c | 30 ++++++++++++++++++++++++++++++ sys/sys/syscall.h | 3 ++- sys/sys/syscall.mk | 3 ++- sys/sys/sysproto.h | 7 +++++++ 6 files changed, 43 insertions(+), 2 deletions(-) diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index 26e2d93e2eb7..b2d0120da519 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -638,4 +638,5 @@ struct sysent sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)sys_sched_getcpu, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 581 = sched_getcpu */ { .sy_narg = AS(swapoff_args), .sy_call = (sy_call_t *)sys_swapoff, .sy_auevent = AUE_SWAPOFF, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 582 = swapoff */ { .sy_narg = AS(kqueuex_args), .sy_call = (sy_call_t *)sys_kqueuex, .sy_auevent = AUE_KQUEUE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 583 = kqueuex */ + { .sy_narg = AS(membarrier_args), .sy_call = (sy_call_t *)sys_membarrier, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 584 = membarrier */ }; diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c index e0f0bd3b4148..22475e2ee226 100644 --- a/sys/kern/syscalls.c +++ b/sys/kern/syscalls.c @@ -589,4 +589,5 @@ const char *syscallnames[] = { "sched_getcpu", /* 581 = sched_getcpu */ "swapoff", /* 582 = swapoff */ "kqueuex", /* 583 = kqueuex */ + "membarrier", /* 584 = membarrier */ }; diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index b24cae6c1207..00e3bead052e 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -3418,6 +3418,15 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 1; break; } + /* membarrier */ + case 584: { + struct membarrier_args *p = params; + iarg[0] = p->cmd; /* int */ + uarg[1] = p->flags; /* unsigned */ + iarg[2] = p->cpu_id; /* int */ + *n_args = 3; + break; + } default: *n_args = 0; break; @@ -9133,6 +9142,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* membarrier */ + case 584: + switch (ndx) { + case 0: + p = "int"; + break; + case 1: + p = "unsigned"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; default: break; }; @@ -11091,6 +11116,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; + /* membarrier */ + case 584: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index 7f65d6eb994e..26d541f4548c 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -519,4 +519,5 @@ #define SYS_sched_getcpu 581 #define SYS_swapoff 582 #define SYS_kqueuex 583 -#define SYS_MAXSYSCALL 584 +#define SYS_membarrier 584 +#define SYS_MAXSYSCALL 585 diff --git a/sys/sys/syscall.mk b/sys/sys/syscall.mk index fdab69b1291e..2be42554587d 100644 --- a/sys/sys/syscall.mk +++ b/sys/sys/syscall.mk @@ -424,4 +424,5 @@ MIASM = \ aio_readv.o \ sched_getcpu.o \ swapoff.o \ - kqueuex.o + kqueuex.o \ + membarrier.o diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index ab327d43a0fb..64ee28267df3 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -1856,6 +1856,11 @@ struct swapoff_args { struct kqueuex_args { char flags_l_[PADL_(u_int)]; u_int flags; char flags_r_[PADR_(u_int)]; }; +struct membarrier_args { + char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; + char flags_l_[PADL_(unsigned)]; unsigned flags; char flags_r_[PADR_(unsigned)]; + char cpu_id_l_[PADL_(int)]; int cpu_id; char cpu_id_r_[PADR_(int)]; +}; int nosys(struct thread *, struct nosys_args *); void sys_sys_exit(struct thread *, struct sys_exit_args *); int sys_fork(struct thread *, struct fork_args *); @@ -2253,6 +2258,7 @@ int sys_aio_readv(struct thread *, struct aio_readv_args *); int sys_sched_getcpu(struct thread *, struct sched_getcpu_args *); int sys_swapoff(struct thread *, struct swapoff_args *); int sys_kqueuex(struct thread *, struct kqueuex_args *); +int sys_membarrier(struct thread *, struct membarrier_args *); #ifdef COMPAT_43 @@ -3200,6 +3206,7 @@ int freebsd12_closefrom(struct thread *, struct freebsd12_closefrom_args *); #define SYS_AUE_sched_getcpu AUE_NULL #define SYS_AUE_swapoff AUE_SWAPOFF #define SYS_AUE_kqueuex AUE_KQUEUE +#define SYS_AUE_membarrier AUE_NULL #undef PAD_ #undef PADL_