Commit 1bca8cf1 authored by Paul E. McKenney's avatar Paul E. McKenney

rcu: Remove unneeded __rcu_process_callbacks() argument

With the advent of __this_cpu_ptr(), it is no longer necessary to pass
both the rcu_state and rcu_data structures into __rcu_process_callbacks().
This commit therefore computes the rcu_data pointer from the rcu_state
pointer within __rcu_process_callbacks() so that callers can pass in
only the pointer to the rcu_state structure.  This paves the way for
linking the rcu_state structures together and iterating over them.
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
parent d7e187c8
...@@ -1788,9 +1788,10 @@ static void force_quiescent_state(struct rcu_state *rsp, int relaxed) ...@@ -1788,9 +1788,10 @@ static void force_quiescent_state(struct rcu_state *rsp, int relaxed)
* whom the rdp belongs. * whom the rdp belongs.
*/ */
static void static void
__rcu_process_callbacks(struct rcu_state *rsp, struct rcu_data *rdp) __rcu_process_callbacks(struct rcu_state *rsp)
{ {
unsigned long flags; unsigned long flags;
struct rcu_data *rdp = __this_cpu_ptr(rsp->rda);
WARN_ON_ONCE(rdp->beenonline == 0); WARN_ON_ONCE(rdp->beenonline == 0);
...@@ -1827,9 +1828,8 @@ __rcu_process_callbacks(struct rcu_state *rsp, struct rcu_data *rdp) ...@@ -1827,9 +1828,8 @@ __rcu_process_callbacks(struct rcu_state *rsp, struct rcu_data *rdp)
static void rcu_process_callbacks(struct softirq_action *unused) static void rcu_process_callbacks(struct softirq_action *unused)
{ {
trace_rcu_utilization("Start RCU core"); trace_rcu_utilization("Start RCU core");
__rcu_process_callbacks(&rcu_sched_state, __rcu_process_callbacks(&rcu_sched_state);
&__get_cpu_var(rcu_sched_data)); __rcu_process_callbacks(&rcu_bh_state);
__rcu_process_callbacks(&rcu_bh_state, &__get_cpu_var(rcu_bh_data));
rcu_preempt_process_callbacks(); rcu_preempt_process_callbacks();
trace_rcu_utilization("End RCU core"); trace_rcu_utilization("End RCU core");
} }
......
...@@ -687,8 +687,7 @@ static void rcu_preempt_check_callbacks(int cpu) ...@@ -687,8 +687,7 @@ static void rcu_preempt_check_callbacks(int cpu)
*/ */
static void rcu_preempt_process_callbacks(void) static void rcu_preempt_process_callbacks(void)
{ {
__rcu_process_callbacks(&rcu_preempt_state, __rcu_process_callbacks(&rcu_preempt_state);
&__get_cpu_var(rcu_preempt_data));
} }
#ifdef CONFIG_RCU_BOOST #ifdef CONFIG_RCU_BOOST
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment