summaryrefslogtreecommitdiff
path: root/kernel/rcu/tree.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-08-15 19:00:31 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-10-07 16:02:50 -0700
commitdcdb8807ba0f5127d4dc67daeeb154edf50a93d1 (patch)
treee303f8279f7a4e0f13d72f092fb6d52091b88320 /kernel/rcu/tree.c
parent66fe6cbee44e3f78d05882195a6a38e30b97b936 (diff)
downloadlinux-sh-dcdb8807ba0f5127d4dc67daeeb154edf50a93d1.tar.gz
rcu: Consolidate expedited CPU selection
Now that sync_sched_exp_select_cpus() and sync_rcu_exp_select_cpus() are identical aside from the the argument to smp_call_function_single(), this commit consolidates them with a functional argument. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu/tree.c')
-rw-r--r--kernel/rcu/tree.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index ae582e3d4136..f44f4b30c68a 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3654,7 +3654,8 @@ static void synchronize_sched_expedited_cpu_stop(void *data)
* Select the nodes that the upcoming expedited grace period needs
* to wait for.
*/
-static void sync_sched_exp_select_cpus(struct rcu_state *rsp)
+static void sync_rcu_exp_select_cpus(struct rcu_state *rsp,
+ smp_call_func_t func)
{
int cpu;
unsigned long flags;
@@ -3696,7 +3697,7 @@ static void sync_sched_exp_select_cpus(struct rcu_state *rsp)
for (cpu = rnp->grplo; cpu <= rnp->grphi; cpu++, mask <<= 1) {
if (!(mask_ofl_ipi & mask))
continue;
- ret = smp_call_function_single(cpu, synchronize_sched_expedited_cpu_stop, NULL, 0);
+ ret = smp_call_function_single(cpu, func, rsp, 0);
if (!ret)
mask_ofl_ipi &= ~mask;
}
@@ -3788,7 +3789,7 @@ void synchronize_sched_expedited(void)
return; /* Someone else did our work for us. */
rcu_exp_gp_seq_start(rsp);
- sync_sched_exp_select_cpus(rsp);
+ sync_rcu_exp_select_cpus(rsp, synchronize_sched_expedited_cpu_stop);
synchronize_sched_expedited_wait(rsp);
rcu_exp_gp_seq_end(rsp);