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

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

 



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@xxxxxxxxx>
---
 src/register.c |  9 +--------
 src/setup.c    | 19 -------------------
 2 files changed, 1 insertion(+), 27 deletions(-)

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;
 }
-- 
2.46.0





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux