linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/firmware: kthread_run_on_cpu function using compound effect
@ 2022-08-25 10:51 Li kunyu
  0 siblings, 0 replies; only message in thread
From: Li kunyu @ 2022-08-25 10:51 UTC (permalink / raw)
  To: dinguyen; +Cc: linux-kernel, Li kunyu

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

Signed-off-by: Li kunyu <kunyu@nfschina.com>
---
 drivers/firmware/stratix10-svc.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/firmware/stratix10-svc.c b/drivers/firmware/stratix10-svc.c
index b4081f4d88a3..6931256683bd 100644
--- a/drivers/firmware/stratix10-svc.c
+++ b/drivers/firmware/stratix10-svc.c
@@ -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__,
-- 
2.18.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-25 10:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-25 10:51 [PATCH] drivers/firmware: kthread_run_on_cpu function using compound effect Li kunyu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).