rcu: Remove rsp parameter from rcu_gp_kthread_wake()

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
rcu_gp_kthread_wake().

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
This commit is contained in:
Paul E. McKenney 2018-07-03 17:22:34 -07:00
parent 3481f2eab0
commit 532c00c97f
2 changed files with 13 additions and 13 deletions

View File

@ -1642,13 +1642,13 @@ static bool rcu_future_gp_cleanup(struct rcu_node *rnp)
* raced to awaken, and we lost), and finally don't try to awaken
* a kthread that has not yet been created.
*/
static void rcu_gp_kthread_wake(struct rcu_state *rsp)
static void rcu_gp_kthread_wake(void)
{
if (current == rsp->gp_kthread ||
!READ_ONCE(rsp->gp_flags) ||
!rsp->gp_kthread)
if (current == rcu_state.gp_kthread ||
!READ_ONCE(rcu_state.gp_flags) ||
!rcu_state.gp_kthread)
return;
swake_up_one(&rsp->gp_wq);
swake_up_one(&rcu_state.gp_wq);
}
/*
@ -1722,7 +1722,7 @@ static void rcu_accelerate_cbs_unlocked(struct rcu_state *rsp,
needwake = rcu_accelerate_cbs(rsp, rnp, rdp);
raw_spin_unlock_rcu_node(rnp); /* irqs remain disabled. */
if (needwake)
rcu_gp_kthread_wake(rsp);
rcu_gp_kthread_wake();
}
/*
@ -1820,7 +1820,7 @@ static void note_gp_changes(struct rcu_state *rsp, struct rcu_data *rdp)
needwake = __note_gp_changes(rsp, rnp, rdp);
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
if (needwake)
rcu_gp_kthread_wake(rsp);
rcu_gp_kthread_wake();
}
static void rcu_gp_slow(struct rcu_state *rsp, int delay)
@ -2203,7 +2203,7 @@ static void rcu_report_qs_rsp(unsigned long flags)
WARN_ON_ONCE(!rcu_gp_in_progress());
WRITE_ONCE(rsp->gp_flags, READ_ONCE(rsp->gp_flags) | RCU_GP_FLAG_FQS);
raw_spin_unlock_irqrestore_rcu_node(rcu_get_root(), flags);
rcu_gp_kthread_wake(rsp);
rcu_gp_kthread_wake();
}
/*
@ -2364,7 +2364,7 @@ rcu_report_qs_rdp(int cpu, struct rcu_data *rdp)
rcu_report_qs_rnp(mask, rnp, rnp->gp_seq, flags);
/* ^^^ Released rnp->lock */
if (needwake)
rcu_gp_kthread_wake(rsp);
rcu_gp_kthread_wake();
}
}
@ -2670,7 +2670,7 @@ static void force_quiescent_state(struct rcu_state *rsp)
}
WRITE_ONCE(rsp->gp_flags, READ_ONCE(rsp->gp_flags) | RCU_GP_FLAG_FQS);
raw_spin_unlock_irqrestore_rcu_node(rnp_old, flags);
rcu_gp_kthread_wake(rsp);
rcu_gp_kthread_wake();
}
/*
@ -3672,7 +3672,7 @@ static void rcu_migrate_callbacks(int cpu, struct rcu_state *rsp)
!rcu_segcblist_n_cbs(&my_rdp->cblist));
raw_spin_unlock_irqrestore_rcu_node(rnp_root, flags);
if (needwake)
rcu_gp_kthread_wake(rsp);
rcu_gp_kthread_wake();
WARN_ONCE(rcu_segcblist_n_cbs(&rdp->cblist) != 0 ||
!rcu_segcblist_empty(&rdp->cblist),
"rcu_cleanup_dead_cpu: Callbacks on offline CPU %d: qlen=%lu, 1stCB=%p\n",

View File

@ -1700,7 +1700,7 @@ static void rcu_prepare_for_idle(void)
needwake = rcu_accelerate_cbs(rsp, rnp, rdp);
raw_spin_unlock_rcu_node(rnp); /* irqs remain disabled. */
if (needwake)
rcu_gp_kthread_wake(rsp);
rcu_gp_kthread_wake();
}
}
@ -2147,7 +2147,7 @@ static void rcu_nocb_wait_gp(struct rcu_data *rdp)
needwake = rcu_start_this_gp(rnp, rdp, c);
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
if (needwake)
rcu_gp_kthread_wake(rdp->rsp);
rcu_gp_kthread_wake();
}
/*