Commit 63d4c8c9 authored by Paul E. McKenney's avatar Paul E. McKenney

rcu: Remove rsp parameter from expedited grace-period functions

There now is only one rcu_state structure in a given build of the
Linux kernel, so there is no need to pass it as a parameter to
RCU's functions.  This commit therefore removes the rsp parameter
from the code in kernel/rcu/tree_exp.h, and removes all of the
rsp local variables while in the area.
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
parent 4580b054
...@@ -139,7 +139,7 @@ static void rcu_cleanup_dead_rnp(struct rcu_node *rnp_leaf); ...@@ -139,7 +139,7 @@ static void rcu_cleanup_dead_rnp(struct rcu_node *rnp_leaf);
static void rcu_boost_kthread_setaffinity(struct rcu_node *rnp, int outgoingcpu); static void rcu_boost_kthread_setaffinity(struct rcu_node *rnp, int outgoingcpu);
static void invoke_rcu_core(void); static void invoke_rcu_core(void);
static void invoke_rcu_callbacks(struct rcu_data *rdp); static void invoke_rcu_callbacks(struct rcu_data *rdp);
static void rcu_report_exp_rdp(struct rcu_state *rsp, struct rcu_data *rdp); static void rcu_report_exp_rdp(struct rcu_data *rdp);
static void sync_sched_exp_online_cleanup(int cpu); static void sync_sched_exp_online_cleanup(int cpu);
/* rcuc/rcub kthread realtime priority */ /* rcuc/rcub kthread realtime priority */
...@@ -3553,7 +3553,7 @@ void rcu_report_dead(unsigned int cpu) ...@@ -3553,7 +3553,7 @@ void rcu_report_dead(unsigned int cpu)
/* QS for any half-done expedited RCU-sched GP. */ /* QS for any half-done expedited RCU-sched GP. */
preempt_disable(); preempt_disable();
rcu_report_exp_rdp(&rcu_state, this_cpu_ptr(&rcu_data)); rcu_report_exp_rdp(this_cpu_ptr(&rcu_data));
preempt_enable(); preempt_enable();
rcu_preempt_deferred_qs(current); rcu_preempt_deferred_qs(current);
......
...@@ -61,7 +61,6 @@ struct rcu_dynticks { ...@@ -61,7 +61,6 @@ struct rcu_dynticks {
/* Communicate arguments to a workqueue handler. */ /* Communicate arguments to a workqueue handler. */
struct rcu_exp_work { struct rcu_exp_work {
smp_call_func_t rew_func; smp_call_func_t rew_func;
struct rcu_state *rew_rsp;
unsigned long rew_s; unsigned long rew_s;
struct work_struct rew_work; struct work_struct rew_work;
}; };
......
This diff is collapsed.
...@@ -123,8 +123,7 @@ static void __init rcu_bootup_announce_oddness(void) ...@@ -123,8 +123,7 @@ static void __init rcu_bootup_announce_oddness(void)
#ifdef CONFIG_PREEMPT_RCU #ifdef CONFIG_PREEMPT_RCU
static void rcu_report_exp_rnp(struct rcu_state *rsp, struct rcu_node *rnp, static void rcu_report_exp_rnp(struct rcu_node *rnp, bool wake);
bool wake);
static void rcu_read_unlock_special(struct task_struct *t); static void rcu_read_unlock_special(struct task_struct *t);
/* /*
...@@ -281,7 +280,7 @@ static void rcu_preempt_ctxt_queue(struct rcu_node *rnp, struct rcu_data *rdp) ...@@ -281,7 +280,7 @@ static void rcu_preempt_ctxt_queue(struct rcu_node *rnp, struct rcu_data *rdp)
* still in a quiescent state in any case.) * still in a quiescent state in any case.)
*/ */
if (blkd_state & RCU_EXP_BLKD && rdp->deferred_qs) if (blkd_state & RCU_EXP_BLKD && rdp->deferred_qs)
rcu_report_exp_rdp(rdp->rsp, rdp); rcu_report_exp_rdp(rdp);
else else
WARN_ON_ONCE(rdp->deferred_qs); WARN_ON_ONCE(rdp->deferred_qs);
} }
...@@ -381,7 +380,7 @@ void rcu_note_context_switch(bool preempt) ...@@ -381,7 +380,7 @@ void rcu_note_context_switch(bool preempt)
*/ */
rcu_qs(); rcu_qs();
if (rdp->deferred_qs) if (rdp->deferred_qs)
rcu_report_exp_rdp(&rcu_state, rdp); rcu_report_exp_rdp(rdp);
trace_rcu_utilization(TPS("End context switch")); trace_rcu_utilization(TPS("End context switch"));
barrier(); /* Avoid RCU read-side critical sections leaking up. */ barrier(); /* Avoid RCU read-side critical sections leaking up. */
} }
...@@ -509,7 +508,7 @@ rcu_preempt_deferred_qs_irqrestore(struct task_struct *t, unsigned long flags) ...@@ -509,7 +508,7 @@ rcu_preempt_deferred_qs_irqrestore(struct task_struct *t, unsigned long flags)
* blocked-tasks list below. * blocked-tasks list below.
*/ */
if (rdp->deferred_qs) { if (rdp->deferred_qs) {
rcu_report_exp_rdp(&rcu_state, rdp); rcu_report_exp_rdp(rdp);
if (!t->rcu_read_unlock_special.s) { if (!t->rcu_read_unlock_special.s) {
local_irq_restore(flags); local_irq_restore(flags);
return; return;
...@@ -580,7 +579,7 @@ rcu_preempt_deferred_qs_irqrestore(struct task_struct *t, unsigned long flags) ...@@ -580,7 +579,7 @@ rcu_preempt_deferred_qs_irqrestore(struct task_struct *t, unsigned long flags)
* then we need to report up the rcu_node hierarchy. * then we need to report up the rcu_node hierarchy.
*/ */
if (!empty_exp && empty_exp_now) if (!empty_exp && empty_exp_now)
rcu_report_exp_rnp(&rcu_state, rnp, true); rcu_report_exp_rnp(rnp, true);
} else { } else {
local_irq_restore(flags); local_irq_restore(flags);
} }
...@@ -947,7 +946,7 @@ static void rcu_qs(void) ...@@ -947,7 +946,7 @@ static void rcu_qs(void)
if (!__this_cpu_read(rcu_data.cpu_no_qs.b.exp)) if (!__this_cpu_read(rcu_data.cpu_no_qs.b.exp))
return; return;
__this_cpu_write(rcu_data.cpu_no_qs.b.exp, false); __this_cpu_write(rcu_data.cpu_no_qs.b.exp, false);
rcu_report_exp_rdp(&rcu_state, this_cpu_ptr(&rcu_data)); rcu_report_exp_rdp(this_cpu_ptr(&rcu_data));
} }
/* /*
......
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