From: Frederic Weisbecker Date: Thu, 26 Sep 2024 22:48:55 +0000 (+0200) Subject: soc/qman: test: Use kthread_run_on_cpu() X-Git-Tag: v6.14-rc1~173^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=76f99fc1566d99bc263249996240df5511c73819;p=thirdparty%2Fkernel%2Flinux.git soc/qman: test: Use kthread_run_on_cpu() Use the proper API instead of open coding it. However it looks like kthreads here could be replaced by the use of a per-cpu workqueue instead. Signed-off-by: Frederic Weisbecker --- diff --git a/drivers/soc/fsl/qbman/qman_test_stash.c b/drivers/soc/fsl/qbman/qman_test_stash.c index b7e8e5ec884c6..f4d3c2146f4f0 100644 --- a/drivers/soc/fsl/qbman/qman_test_stash.c +++ b/drivers/soc/fsl/qbman/qman_test_stash.c @@ -108,14 +108,12 @@ static int on_all_cpus(int (*fn)(void)) .fn = fn, .started = ATOMIC_INIT(0) }; - struct task_struct *k = kthread_create(bstrap_fn, &bstrap, - "hotpotato%d", cpu); + struct task_struct *k = kthread_run_on_cpu(bstrap_fn, &bstrap, + cpu, "hotpotato%d"); int ret; if (IS_ERR(k)) return -ENOMEM; - kthread_bind(k, cpu); - wake_up_process(k); /* * If we call kthread_stop() before the "wake up" has had an * effect, then the thread may exit with -EINTR without ever