mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 22:21:21 +00:00
rcu: Switch to this_cpu() primitives
This removes a couple of lines from invoke_rcu_cpu_kthread(), improving readability. Reported-by: Christoph Lameter <cl@linux.com> Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
This commit is contained in:
parent
108aae2233
commit
f0a07aeaf8
1 changed files with 3 additions and 7 deletions
|
@ -1480,18 +1480,14 @@ static void rcu_process_callbacks(void)
|
||||||
static void invoke_rcu_cpu_kthread(void)
|
static void invoke_rcu_cpu_kthread(void)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
wait_queue_head_t *q;
|
|
||||||
int cpu;
|
|
||||||
|
|
||||||
local_irq_save(flags);
|
local_irq_save(flags);
|
||||||
cpu = smp_processor_id();
|
__this_cpu_write(rcu_cpu_has_work, 1);
|
||||||
per_cpu(rcu_cpu_has_work, cpu) = 1;
|
if (__this_cpu_read(rcu_cpu_kthread_task) == NULL) {
|
||||||
if (per_cpu(rcu_cpu_kthread_task, cpu) == NULL) {
|
|
||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
q = &per_cpu(rcu_cpu_wq, cpu);
|
wake_up(&__get_cpu_var(rcu_cpu_wq));
|
||||||
wake_up(q);
|
|
||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue