diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-01-18 21:21:09 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-02-26 15:01:25 -0500 |
commit | d3f3f3f25b1d4ee152f3f19a812c3a282da4c120 (patch) | |
tree | 41839ad01d6a1ea6b72c517a207ba0de427cedc3 /kernel/rcu/tree.c | |
parent | c517d838eb7d07bbe9507871fab3931deccff539 (diff) |
rcu: Abstract default callback-list initialization from init_callback_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>
Diffstat (limited to 'kernel/rcu/tree.c')
-rw-r--r-- | kernel/rcu/tree.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 48d640ca1a05..f8cdb92da10b 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
@@ -1328,20 +1328,30 @@ void rcu_cpu_stall_reset(void) | |||
1328 | } | 1328 | } |
1329 | 1329 | ||
1330 | /* | 1330 | /* |
1331 | * Initialize the specified rcu_data structure's callback list to empty. | 1331 | * Initialize the specified rcu_data structure's default callback list |
1332 | * to empty. The default callback list is the one that is not used by | ||
1333 | * no-callbacks CPUs. | ||
1332 | */ | 1334 | */ |
1333 | static void init_callback_list(struct rcu_data *rdp) | 1335 | static void init_default_callback_list(struct rcu_data *rdp) |
1334 | { | 1336 | { |
1335 | int i; | 1337 | int i; |
1336 | 1338 | ||
1337 | if (init_nocb_callback_list(rdp)) | ||
1338 | return; | ||
1339 | rdp->nxtlist = NULL; | 1339 | rdp->nxtlist = NULL; |
1340 | for (i = 0; i < RCU_NEXT_SIZE; i++) | 1340 | for (i = 0; i < RCU_NEXT_SIZE; i++) |
1341 | rdp->nxttail[i] = &rdp->nxtlist; | 1341 | rdp->nxttail[i] = &rdp->nxtlist; |
1342 | } | 1342 | } |
1343 | 1343 | ||
1344 | /* | 1344 | /* |
1345 | * Initialize the specified rcu_data structure's callback list to empty. | ||
1346 | */ | ||
1347 | static void init_callback_list(struct rcu_data *rdp) | ||
1348 | { | ||
1349 | if (init_nocb_callback_list(rdp)) | ||
1350 | return; | ||
1351 | init_default_callback_list(rdp); | ||
1352 | } | ||
1353 | |||
1354 | /* | ||
1345 | * Determine the value that ->completed will have at the end of the | 1355 | * Determine the value that ->completed will have at the end of the |
1346 | * next subsequent grace period. This is used to tag callbacks so that | 1356 | * next subsequent grace period. This is used to tag callbacks so that |
1347 | * a CPU can invoke callbacks in a timely fashion even if that CPU has | 1357 | * a CPU can invoke callbacks in a timely fashion even if that CPU has |