diff mbox series

[for-next,v3,13/13] RDMA/rxe: Remove tasklets from rxe_task.c

Message ID 20221029031009.64467-14-rpearsonhpe@gmail.com (mailing list archive)
State Changes Requested
Delegated to: Jason Gunthorpe
Headers show
Series Implement work queues for rdma_rxe | expand

Commit Message

Bob Pearson Oct. 29, 2022, 3:10 a.m. UTC
Remove the option to select tasklets(). Maintain the option to have
a pluggable interface for future expansion.

Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
---
 drivers/infiniband/sw/rxe/rxe_task.c | 51 ----------------------------
 drivers/infiniband/sw/rxe/rxe_task.h |  8 ++---
 2 files changed, 2 insertions(+), 57 deletions(-)
diff mbox series

Patch

diff --git a/drivers/infiniband/sw/rxe/rxe_task.c b/drivers/infiniband/sw/rxe/rxe_task.c
index c1177752088d..d9c4ab2e58c8 100644
--- a/drivers/infiniband/sw/rxe/rxe_task.c
+++ b/drivers/infiniband/sw/rxe/rxe_task.c
@@ -166,54 +166,6 @@  static void inline_init(struct rxe_task *task)
 	task->ops = &inline_ops;
 }
 
-/* use tsklet_xxx to avoid name collisions with tasklet_xxx */
-static void tsklet_sched(struct rxe_task *task)
-{
-	if (task_is_idle(task))
-		tasklet_schedule(&task->tasklet);
-}
-
-static void tsklet_do_task(struct tasklet_struct *tasklet)
-{
-	do_task(container_of(tasklet, struct rxe_task, tasklet));
-}
-
-static void tsklet_run(struct rxe_task *task)
-{
-	if (task_is_idle(task))
-		do_task(task);
-}
-
-static void tsklet_disable(struct rxe_task *task)
-{
-	disable_task(task);
-}
-
-static void tsklet_enable(struct rxe_task *task)
-{
-	enable_task(task);
-}
-
-static void tsklet_cleanup(struct rxe_task *task)
-{
-	cleanup_task(task);
-	tasklet_kill(&task->tasklet);
-}
-
-static const struct rxe_task_ops tsklet_ops = {
-	.sched = tsklet_sched,
-	.run = tsklet_run,
-	.enable = tsklet_enable,
-	.disable = tsklet_disable,
-	.cleanup = tsklet_cleanup,
-};
-
-static void tsklet_init(struct rxe_task *task)
-{
-	tasklet_setup(&task->tasklet, tsklet_do_task);
-	task->ops = &tsklet_ops;
-}
-
 static void work_sched(struct rxe_task *task)
 {
 	if (task_is_idle(task))
@@ -275,9 +227,6 @@  int rxe_init_task(struct rxe_task *task, void *arg, int (*func)(void *),
 	case RXE_TASK_TYPE_INLINE:
 		inline_init(task);
 		break;
-	case RXE_TASK_TYPE_TASKLET:
-		tsklet_init(task);
-		break;
 	case RXE_TASK_TYPE_WORKQUEUE:
 		work_init(task);
 		break;
diff --git a/drivers/infiniband/sw/rxe/rxe_task.h b/drivers/infiniband/sw/rxe/rxe_task.h
index d1156b935635..fbc7e2bf4e5a 100644
--- a/drivers/infiniband/sw/rxe/rxe_task.h
+++ b/drivers/infiniband/sw/rxe/rxe_task.h
@@ -19,8 +19,7 @@  struct rxe_task_ops {
 
 enum rxe_task_type {
 	RXE_TASK_TYPE_INLINE	= 0,
-	RXE_TASK_TYPE_TASKLET	= 1,
-	RXE_TASK_TYPE_WORKQUEUE	= 2,
+	RXE_TASK_TYPE_WORKQUEUE	= 1,
 };
 
 enum {
@@ -37,10 +36,7 @@  enum {
  * called again.
  */
 struct rxe_task {
-	union {
-		struct tasklet_struct		tasklet;
-		struct work_struct		work;
-	};
+	struct work_struct		work;
 	int				state;
 	spinlock_t			lock;
 	void				*arg;