rcu: Eliminate rcu_state structure's ->call field
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 3 Jul 2018 22:02:28 +0000 (15:02 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 30 Aug 2018 23:02:48 +0000 (16:02 -0700)
The rcu_state structure's ->call field references the corresponding RCU
flavor's call_rcu() function.  However, now that there is only ever one
rcu_state structure in a given build of the Linux kernel, and that flavor
uses plain old call_rcu(), there is not a lot of point in continuing to
have the ->call field.  This commit therefore removes it.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/tree.c
kernel/rcu/tree.h
kernel/rcu/tree_exp.h

index 1d36cbcce1b42d989928adb58ff9edf803abaac0..ea0dfd13fd27f4ff4370411ae330da56e434d5c1 100644 (file)
@@ -76,7 +76,6 @@ static DEFINE_PER_CPU_SHARED_ALIGNED(struct rcu_data, rcu_data);
 struct rcu_state rcu_state = {
        .level = { &rcu_state.node[0] },
        .rda = &rcu_data,
-       .call = call_rcu,
        .gp_state = RCU_GP_IDLE,
        .gp_seq = (0UL - 300UL) << RCU_SEQ_CTR_SHIFT,
        .barrier_mutex = __MUTEX_INITIALIZER(rcu_state.barrier_mutex),
index 3f36562d311888decd6ca60df958f470bc866577..c5006056714654a41aef25bc8093760054a17859 100644 (file)
@@ -313,7 +313,6 @@ struct rcu_state {
                                                /* Hierarchy levels (+1 to */
                                                /*  shut bogus gcc warning) */
        struct rcu_data __percpu *rda;          /* pointer of percu rcu_data. */
-       call_rcu_func_t call;                   /* call_rcu() flavor. */
        int ncpus;                              /* # CPUs seen so far. */
 
        /* The following fields are guarded by the root rcu_node's lock. */
index 5619edfd414e0220201e9c587032a876b8bcee5b..224f05f0c0c92d115244e2a10638251857c89481 100644 (file)
@@ -619,7 +619,7 @@ static void _synchronize_rcu_expedited(struct rcu_state *rsp,
 
        /* If expedited grace periods are prohibited, fall back to normal. */
        if (rcu_gp_is_normal()) {
-               wait_rcu_gp(rsp->call);
+               wait_rcu_gp(call_rcu);
                return;
        }