mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
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 <frederic@kernel.org>
This commit is contained in:
parent
4f770f9300
commit
b61ac4b022
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user