]> git.karo-electronics.de Git - linux-beck.git/commitdiff
rcu: Abstract default callback-list initialization from init_callback_list()
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 19 Jan 2015 02:21:09 +0000 (18:21 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 26 Feb 2015 20:01:25 +0000 (12:01 -0800)
In preparation for early-boot posting of callbacks, this commit abstracts
initialization of the default (non-no-CB) callbacks list from the
init_callback_list() function into a new init_default_callback_list()
function.

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

index 48d640ca1a05b8c0f83fe2b217b925a6dec69fa4..f8cdb92da10b1dfc3d5f4165809854ab6e659d2d 100644 (file)
@@ -1328,19 +1328,29 @@ void rcu_cpu_stall_reset(void)
 }
 
 /*
- * Initialize the specified rcu_data structure's callback list to empty.
+ * Initialize the specified rcu_data structure's default callback list
+ * to empty.  The default callback list is the one that is not used by
+ * no-callbacks CPUs.
  */
-static void init_callback_list(struct rcu_data *rdp)
+static void init_default_callback_list(struct rcu_data *rdp)
 {
        int i;
 
-       if (init_nocb_callback_list(rdp))
-               return;
        rdp->nxtlist = NULL;
        for (i = 0; i < RCU_NEXT_SIZE; i++)
                rdp->nxttail[i] = &rdp->nxtlist;
 }
 
+/*
+ * Initialize the specified rcu_data structure's callback list to empty.
+ */
+static void init_callback_list(struct rcu_data *rdp)
+{
+       if (init_nocb_callback_list(rdp))
+               return;
+       init_default_callback_list(rdp);
+}
+
 /*
  * Determine the value that ->completed will have at the end of the
  * next subsequent grace period.  This is used to tag callbacks so that