Skip to content

Commit

Permalink
rcu: Abstract default callback-list initialization from init_callback…
Browse files Browse the repository at this point in the history
…_list()

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>
  • Loading branch information
Paul E. McKenney committed Feb 26, 2015
1 parent c517d83 commit d3f3f3f
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions kernel/rcu/tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d3f3f3f

Please sign in to comment.