aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutree.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r--kernel/rcutree.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 4d71d4e8b5a8..7c515082ae84 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -1543,8 +1543,9 @@ static void __init rcu_init_one(struct rcu_state *rsp)
1543 * Helper macro for __rcu_init(). To be used nowhere else! 1543 * Helper macro for __rcu_init(). To be used nowhere else!
1544 * Assigns leaf node pointers into each CPU's rcu_data structure. 1544 * Assigns leaf node pointers into each CPU's rcu_data structure.
1545 */ 1545 */
1546#define RCU_DATA_PTR_INIT(rsp, rcu_data) \ 1546#define RCU_INIT_FLAVOR(rsp, rcu_data) \
1547do { \ 1547do { \
1548 rcu_init_one(rsp); \
1548 rnp = (rsp)->level[NUM_RCU_LVLS - 1]; \ 1549 rnp = (rsp)->level[NUM_RCU_LVLS - 1]; \
1549 j = 0; \ 1550 j = 0; \
1550 for_each_possible_cpu(i) { \ 1551 for_each_possible_cpu(i) { \
@@ -1552,6 +1553,7 @@ do { \
1552 j++; \ 1553 j++; \
1553 per_cpu(rcu_data, i).mynode = &rnp[j]; \ 1554 per_cpu(rcu_data, i).mynode = &rnp[j]; \
1554 (rsp)->rda[i] = &per_cpu(rcu_data, i); \ 1555 (rsp)->rda[i] = &per_cpu(rcu_data, i); \
1556 rcu_boot_init_percpu_data(i, rsp); \
1555 } \ 1557 } \
1556} while (0) 1558} while (0)
1557 1559
@@ -1565,14 +1567,8 @@ void __init __rcu_init(void)
1565#ifdef CONFIG_RCU_CPU_STALL_DETECTOR 1567#ifdef CONFIG_RCU_CPU_STALL_DETECTOR
1566 printk(KERN_INFO "RCU-based detection of stalled CPUs is enabled.\n"); 1568 printk(KERN_INFO "RCU-based detection of stalled CPUs is enabled.\n");
1567#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */ 1569#endif /* #ifdef CONFIG_RCU_CPU_STALL_DETECTOR */
1568 rcu_init_one(&rcu_sched_state); 1570 RCU_INIT_FLAVOR(&rcu_sched_state, rcu_sched_data);
1569 RCU_DATA_PTR_INIT(&rcu_sched_state, rcu_sched_data); 1571 RCU_INIT_FLAVOR(&rcu_bh_state, rcu_bh_data);
1570 for_each_possible_cpu(i)
1571 rcu_boot_init_percpu_data(i, &rcu_sched_state);
1572 rcu_init_one(&rcu_bh_state);
1573 RCU_DATA_PTR_INIT(&rcu_bh_state, rcu_bh_data);
1574 for_each_possible_cpu(i)
1575 rcu_boot_init_percpu_data(i, &rcu_bh_state);
1576 open_softirq(RCU_SOFTIRQ, rcu_process_callbacks); 1572 open_softirq(RCU_SOFTIRQ, rcu_process_callbacks);
1577} 1573}
1578 1574