Skip to contentSkip to conversation

drivers/firmware: kthread_run_on_cpu function using compound effect

PATCH New Li kunyu 1 participant 1 message Aug 25, 2022 Intel STRATIX10 firmware drivers

lore
Share & tools
lore

Li kunyu

author
#0 lore raw

PATCH 1/1 drivers/firmware: kthread_run_on_cpu function using compound effect

Replace kthread_create_on_node()/kthread_bind()/wake_up_process() with kthread_run_on_cpu() function.

---
 drivers/firmware/stratix10-svc.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/firmware/stratix10-svc.c +3 -5
index b4081f4d88a3..6931256683bd 100644
@@ -949,18 +949,16 @@ int stratix10_svc_send(struct stratix10_svc_chan *chan, void *msg)
 	/* first client will create kernel thread */
 	if (!chan->ctrl->task) {
 		chan->ctrl->task =
-			kthread_create_on_node(svc_normal_to_secure_thread,
+			kthread_run_on_cpu(svc_normal_to_secure_thread,
 					      (void *)chan->ctrl,
-					      cpu_to_node(cpu),
-					      "svc_smc_hvc_thread");
+					      cpu,
+					      "svc_smc_hvc_thread_%u");
 			if (IS_ERR(chan->ctrl->task)) {
 				dev_err(chan->ctrl->dev,
 					"failed to create svc_smc_hvc_thread\n");
 				kfree(p_data);
 				return -EINVAL;
 			}
-		kthread_bind(chan->ctrl->task, cpu);
-		wake_up_process(chan->ctrl->task);
 	}
 
 	pr_debug("%s: sent P-va=%p, P-com=%x, P-size=%u\n", __func__,
Signature · 1 line
2.18.2