Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Oct 2023 19:07:50 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 0437db781b7c - stable/13 - Regen
Message-ID:  <202310261907.39QJ7oKL041120@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=0437db781b7cf3b011665d0e21b9a035ab3e0272

commit 0437db781b7cf3b011665d0e21b9a035ab3e0272
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2023-10-26 04:06:56 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
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_



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202310261907.39QJ7oKL041120>