rcu: Remove rsp parameter from rcu_gp_kthread_wake()
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 4 Jul 2018 00:22:34 +0000 (17:22 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 30 Aug 2018 23:02:59 +0000 (16:02 -0700)
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>
kernel/rcu/tree.c
kernel/rcu/tree_plugin.h

index 87fc0727a9b8d9b05d4944d8e896be37ca9f57f3..06f83fce416bab738f316c3f5858a1faeb33dcae 100644 (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",
index 545e4ac9422a92cc2a98e1e6f8e6f4e0657901d4..50ca000ad9f2334878b5726586f1072d6de775a7 100644 (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();
        }
 
        /*