mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 22:25:03 +00:00
rcu: Remove rsp parameter from __note_gp_changes()
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 __note_gp_changes(). Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
This commit is contained in:
parent
834f56bf54
commit
c7e48f7ba3
1 changed files with 5 additions and 5 deletions
|
@ -1758,11 +1758,11 @@ static bool rcu_advance_cbs(struct rcu_node *rnp, struct rcu_data *rdp)
|
||||||
* structure corresponding to the current CPU, and must have irqs disabled.
|
* structure corresponding to the current CPU, and must have irqs disabled.
|
||||||
* Returns true if the grace-period kthread needs to be awakened.
|
* Returns true if the grace-period kthread needs to be awakened.
|
||||||
*/
|
*/
|
||||||
static bool __note_gp_changes(struct rcu_state *rsp, struct rcu_node *rnp,
|
static bool __note_gp_changes(struct rcu_node *rnp, struct rcu_data *rdp)
|
||||||
struct rcu_data *rdp)
|
|
||||||
{
|
{
|
||||||
bool ret;
|
bool ret;
|
||||||
bool need_gp;
|
bool need_gp;
|
||||||
|
struct rcu_state __maybe_unused *rsp = &rcu_state;
|
||||||
|
|
||||||
raw_lockdep_assert_held_rcu_node(rnp);
|
raw_lockdep_assert_held_rcu_node(rnp);
|
||||||
|
|
||||||
|
@ -1815,7 +1815,7 @@ static void note_gp_changes(struct rcu_state *rsp, struct rcu_data *rdp)
|
||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
needwake = __note_gp_changes(rsp, rnp, rdp);
|
needwake = __note_gp_changes(rnp, rdp);
|
||||||
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
|
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
|
||||||
if (needwake)
|
if (needwake)
|
||||||
rcu_gp_kthread_wake();
|
rcu_gp_kthread_wake();
|
||||||
|
@ -1940,7 +1940,7 @@ static bool rcu_gp_init(struct rcu_state *rsp)
|
||||||
rnp->qsmask = rnp->qsmaskinit;
|
rnp->qsmask = rnp->qsmaskinit;
|
||||||
WRITE_ONCE(rnp->gp_seq, rsp->gp_seq);
|
WRITE_ONCE(rnp->gp_seq, rsp->gp_seq);
|
||||||
if (rnp == rdp->mynode)
|
if (rnp == rdp->mynode)
|
||||||
(void)__note_gp_changes(rsp, rnp, rdp);
|
(void)__note_gp_changes(rnp, rdp);
|
||||||
rcu_preempt_boost_start_gp(rnp);
|
rcu_preempt_boost_start_gp(rnp);
|
||||||
trace_rcu_grace_period_init(rsp->name, rnp->gp_seq,
|
trace_rcu_grace_period_init(rsp->name, rnp->gp_seq,
|
||||||
rnp->level, rnp->grplo,
|
rnp->level, rnp->grplo,
|
||||||
|
@ -2051,7 +2051,7 @@ static void rcu_gp_cleanup(struct rcu_state *rsp)
|
||||||
WRITE_ONCE(rnp->gp_seq, new_gp_seq);
|
WRITE_ONCE(rnp->gp_seq, new_gp_seq);
|
||||||
rdp = this_cpu_ptr(&rcu_data);
|
rdp = this_cpu_ptr(&rcu_data);
|
||||||
if (rnp == rdp->mynode)
|
if (rnp == rdp->mynode)
|
||||||
needgp = __note_gp_changes(rsp, rnp, rdp) || needgp;
|
needgp = __note_gp_changes(rnp, rdp) || needgp;
|
||||||
/* smp_mb() provided by prior unlock-lock pair. */
|
/* smp_mb() provided by prior unlock-lock pair. */
|
||||||
needgp = rcu_future_gp_cleanup(rnp) || needgp;
|
needgp = rcu_future_gp_cleanup(rnp) || needgp;
|
||||||
sq = rcu_nocb_gp_get(rnp);
|
sq = rcu_nocb_gp_get(rnp);
|
||||||
|
|
Loading…
Reference in a new issue