diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2018-07-03 20:22:34 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2018-08-30 19:02:59 -0400 |
commit | 532c00c97f16a2a8576d453ae13ddc38162faed4 (patch) | |
tree | bb0ef9c4b2269aa33fcfbe252dc335ef91e7c1f9 /kernel | |
parent | 3481f2eab09563456bbc7cb358ad5d151a509064 (diff) |
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>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rcu/tree.c | 22 | ||||
-rw-r--r-- | kernel/rcu/tree_plugin.h | 4 |
2 files changed, 13 insertions, 13 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 87fc0727a9b8..06f83fce416b 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
@@ -1642,13 +1642,13 @@ static bool rcu_future_gp_cleanup(struct rcu_node *rnp) | |||
1642 | * raced to awaken, and we lost), and finally don't try to awaken | 1642 | * raced to awaken, and we lost), and finally don't try to awaken |
1643 | * a kthread that has not yet been created. | 1643 | * a kthread that has not yet been created. |
1644 | */ | 1644 | */ |
1645 | static void rcu_gp_kthread_wake(struct rcu_state *rsp) | 1645 | static void rcu_gp_kthread_wake(void) |
1646 | { | 1646 | { |
1647 | if (current == rsp->gp_kthread || | 1647 | if (current == rcu_state.gp_kthread || |
1648 | !READ_ONCE(rsp->gp_flags) || | 1648 | !READ_ONCE(rcu_state.gp_flags) || |
1649 | !rsp->gp_kthread) | 1649 | !rcu_state.gp_kthread) |
1650 | return; | 1650 | return; |
1651 | swake_up_one(&rsp->gp_wq); | 1651 | swake_up_one(&rcu_state.gp_wq); |
1652 | } | 1652 | } |
1653 | 1653 | ||
1654 | /* | 1654 | /* |
@@ -1722,7 +1722,7 @@ static void rcu_accelerate_cbs_unlocked(struct rcu_state *rsp, | |||
1722 | needwake = rcu_accelerate_cbs(rsp, rnp, rdp); | 1722 | needwake = rcu_accelerate_cbs(rsp, rnp, rdp); |
1723 | raw_spin_unlock_rcu_node(rnp); /* irqs remain disabled. */ | 1723 | raw_spin_unlock_rcu_node(rnp); /* irqs remain disabled. */ |
1724 | if (needwake) | 1724 | if (needwake) |
1725 | rcu_gp_kthread_wake(rsp); | 1725 | rcu_gp_kthread_wake(); |
1726 | } | 1726 | } |
1727 | 1727 | ||
1728 | /* | 1728 | /* |
@@ -1820,7 +1820,7 @@ static void note_gp_changes(struct rcu_state *rsp, struct rcu_data *rdp) | |||
1820 | needwake = __note_gp_changes(rsp, rnp, rdp); | 1820 | needwake = __note_gp_changes(rsp, rnp, rdp); |
1821 | raw_spin_unlock_irqrestore_rcu_node(rnp, flags); | 1821 | raw_spin_unlock_irqrestore_rcu_node(rnp, flags); |
1822 | if (needwake) | 1822 | if (needwake) |
1823 | rcu_gp_kthread_wake(rsp); | 1823 | rcu_gp_kthread_wake(); |
1824 | } | 1824 | } |
1825 | 1825 | ||
1826 | static void rcu_gp_slow(struct rcu_state *rsp, int delay) | 1826 | static void rcu_gp_slow(struct rcu_state *rsp, int delay) |
@@ -2203,7 +2203,7 @@ static void rcu_report_qs_rsp(unsigned long flags) | |||
2203 | WARN_ON_ONCE(!rcu_gp_in_progress()); | 2203 | WARN_ON_ONCE(!rcu_gp_in_progress()); |
2204 | WRITE_ONCE(rsp->gp_flags, READ_ONCE(rsp->gp_flags) | RCU_GP_FLAG_FQS); | 2204 | WRITE_ONCE(rsp->gp_flags, READ_ONCE(rsp->gp_flags) | RCU_GP_FLAG_FQS); |
2205 | raw_spin_unlock_irqrestore_rcu_node(rcu_get_root(), flags); | 2205 | raw_spin_unlock_irqrestore_rcu_node(rcu_get_root(), flags); |
2206 | rcu_gp_kthread_wake(rsp); | 2206 | rcu_gp_kthread_wake(); |
2207 | } | 2207 | } |
2208 | 2208 | ||
2209 | /* | 2209 | /* |
@@ -2364,7 +2364,7 @@ rcu_report_qs_rdp(int cpu, struct rcu_data *rdp) | |||
2364 | rcu_report_qs_rnp(mask, rnp, rnp->gp_seq, flags); | 2364 | rcu_report_qs_rnp(mask, rnp, rnp->gp_seq, flags); |
2365 | /* ^^^ Released rnp->lock */ | 2365 | /* ^^^ Released rnp->lock */ |
2366 | if (needwake) | 2366 | if (needwake) |
2367 | rcu_gp_kthread_wake(rsp); | 2367 | rcu_gp_kthread_wake(); |
2368 | } | 2368 | } |
2369 | } | 2369 | } |
2370 | 2370 | ||
@@ -2670,7 +2670,7 @@ static void force_quiescent_state(struct rcu_state *rsp) | |||
2670 | } | 2670 | } |
2671 | WRITE_ONCE(rsp->gp_flags, READ_ONCE(rsp->gp_flags) | RCU_GP_FLAG_FQS); | 2671 | WRITE_ONCE(rsp->gp_flags, READ_ONCE(rsp->gp_flags) | RCU_GP_FLAG_FQS); |
2672 | raw_spin_unlock_irqrestore_rcu_node(rnp_old, flags); | 2672 | raw_spin_unlock_irqrestore_rcu_node(rnp_old, flags); |
2673 | rcu_gp_kthread_wake(rsp); | 2673 | rcu_gp_kthread_wake(); |
2674 | } | 2674 | } |
2675 | 2675 | ||
2676 | /* | 2676 | /* |
@@ -3672,7 +3672,7 @@ static void rcu_migrate_callbacks(int cpu, struct rcu_state *rsp) | |||
3672 | !rcu_segcblist_n_cbs(&my_rdp->cblist)); | 3672 | !rcu_segcblist_n_cbs(&my_rdp->cblist)); |
3673 | raw_spin_unlock_irqrestore_rcu_node(rnp_root, flags); | 3673 | raw_spin_unlock_irqrestore_rcu_node(rnp_root, flags); |
3674 | if (needwake) | 3674 | if (needwake) |
3675 | rcu_gp_kthread_wake(rsp); | 3675 | rcu_gp_kthread_wake(); |
3676 | WARN_ONCE(rcu_segcblist_n_cbs(&rdp->cblist) != 0 || | 3676 | WARN_ONCE(rcu_segcblist_n_cbs(&rdp->cblist) != 0 || |
3677 | !rcu_segcblist_empty(&rdp->cblist), | 3677 | !rcu_segcblist_empty(&rdp->cblist), |
3678 | "rcu_cleanup_dead_cpu: Callbacks on offline CPU %d: qlen=%lu, 1stCB=%p\n", | 3678 | "rcu_cleanup_dead_cpu: Callbacks on offline CPU %d: qlen=%lu, 1stCB=%p\n", |
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 545e4ac9422a..50ca000ad9f2 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h | |||
@@ -1700,7 +1700,7 @@ static void rcu_prepare_for_idle(void) | |||
1700 | needwake = rcu_accelerate_cbs(rsp, rnp, rdp); | 1700 | needwake = rcu_accelerate_cbs(rsp, rnp, rdp); |
1701 | raw_spin_unlock_rcu_node(rnp); /* irqs remain disabled. */ | 1701 | raw_spin_unlock_rcu_node(rnp); /* irqs remain disabled. */ |
1702 | if (needwake) | 1702 | if (needwake) |
1703 | rcu_gp_kthread_wake(rsp); | 1703 | rcu_gp_kthread_wake(); |
1704 | } | 1704 | } |
1705 | } | 1705 | } |
1706 | 1706 | ||
@@ -2147,7 +2147,7 @@ static void rcu_nocb_wait_gp(struct rcu_data *rdp) | |||
2147 | needwake = rcu_start_this_gp(rnp, rdp, c); | 2147 | needwake = rcu_start_this_gp(rnp, rdp, c); |
2148 | raw_spin_unlock_irqrestore_rcu_node(rnp, flags); | 2148 | raw_spin_unlock_irqrestore_rcu_node(rnp, flags); |
2149 | if (needwake) | 2149 | if (needwake) |
2150 | rcu_gp_kthread_wake(rdp->rsp); | 2150 | rcu_gp_kthread_wake(); |
2151 | } | 2151 | } |
2152 | 2152 | ||
2153 | /* | 2153 | /* |