mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
RDMA/siw: make use of the helper function kthread_run_on_cpu()
Replace kthread_create/kthread_bind/wake_up_process() with kthread_run_on_cpu() to simplify the code. Link: https://lkml.kernel.org/r/20211022025711.3673-3-caihuoqing@baidu.com Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Cc: Bernard Metzler <bmt@zurich.ibm.com> Cc: Daniel Bristot de Oliveira <bristot@kernel.org> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: Doug Ledford <dledford@redhat.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: Joel Fernandes (Google) <joel@joelfernandes.org> Cc: Josh Triplett <josh@joshtriplett.org> Cc: Lai Jiangshan <jiangshanlai@gmail.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: "Paul E . McKenney" <paulmck@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
800977f6f3
commit
e085011393
@ -98,15 +98,14 @@ static int siw_create_tx_threads(void)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
siw_tx_thread[cpu] =
|
siw_tx_thread[cpu] =
|
||||||
kthread_create(siw_run_sq, (unsigned long *)(long)cpu,
|
kthread_run_on_cpu(siw_run_sq,
|
||||||
"siw_tx/%d", cpu);
|
(unsigned long *)(long)cpu,
|
||||||
|
cpu, "siw_tx/%u");
|
||||||
if (IS_ERR(siw_tx_thread[cpu])) {
|
if (IS_ERR(siw_tx_thread[cpu])) {
|
||||||
siw_tx_thread[cpu] = NULL;
|
siw_tx_thread[cpu] = NULL;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
kthread_bind(siw_tx_thread[cpu], cpu);
|
|
||||||
|
|
||||||
wake_up_process(siw_tx_thread[cpu]);
|
|
||||||
assigned++;
|
assigned++;
|
||||||
}
|
}
|
||||||
return assigned;
|
return assigned;
|
||||||
|
Loading…
Reference in New Issue
Block a user