diff mbox series

[liburing,1/8] queue: break reg wait setup

Message ID ddc75fc65ec8dc7ef0e8a681888266d2d8e9669f.1731705935.git.asml.silence@gmail.com (mailing list archive)
State New
Headers show
Series update reg-wait to use region API | expand

Commit Message

Pavel Begunkov Nov. 15, 2024, 9:33 p.m. UTC
We're changing the registration and kernel api, kill reg wait
registration but leave definitions so that tests build.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 src/register.c |  9 +--------
 src/setup.c    | 19 -------------------
 2 files changed, 1 insertion(+), 27 deletions(-)
diff mbox series

Patch

diff --git a/src/register.c b/src/register.c
index aef5baf..d566f5c 100644
--- a/src/register.c
+++ b/src/register.c
@@ -468,12 +468,5 @@  out:
 int io_uring_register_wait_reg(struct io_uring *ring,
 			       struct io_uring_reg_wait *reg, int nr)
 {
-	struct io_uring_cqwait_reg_arg arg = {
-		.flags		= 0,
-		.struct_size	= sizeof(*reg),
-		.nr_entries	= nr,
-		.user_addr	= (unsigned long) (uintptr_t) reg,
-	};
-
-	return do_register(ring, IORING_REGISTER_CQWAIT_REG, &arg, 1);
+	return -EINVAL;
 }
diff --git a/src/setup.c b/src/setup.c
index 073de50..7c0cfab 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -689,29 +689,10 @@  int io_uring_free_buf_ring(struct io_uring *ring, struct io_uring_buf_ring *br,
 
 void io_uring_free_reg_wait(struct io_uring_reg_wait *reg, unsigned nentries)
 {
-	__sys_munmap(reg, nentries * sizeof(struct io_uring_reg_wait));
 }
 
 struct io_uring_reg_wait *io_uring_setup_reg_wait(struct io_uring *ring,
 						  unsigned nentries, int *err)
 {
-	struct io_uring_reg_wait *reg;
-	size_t size = nentries * sizeof(*reg);
-	int ret;
-
-	reg = __sys_mmap(NULL, size, PROT_READ | PROT_WRITE,
-			MAP_SHARED|MAP_POPULATE|MAP_ANONYMOUS, -1, 0);
-	if (IS_ERR(reg)) {
-		*err = PTR_ERR(reg);
-		return NULL;
-	}
-
-	memset(reg, 0, size);
-	ret = io_uring_register_wait_reg(ring, reg, nentries);
-	if (!ret)
-		return reg;
-
-	__sys_munmap(reg, size);
-	*err = ret;
 	return NULL;
 }