diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rcutree.c | 14 | ||||
-rw-r--r-- | kernel/rcutree_plugin.h | 4 |
2 files changed, 7 insertions, 11 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 30201494560b..97994a329d80 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -64,7 +64,8 @@ | |||
64 | static struct lock_class_key rcu_node_class[RCU_NUM_LVLS]; | 64 | static struct lock_class_key rcu_node_class[RCU_NUM_LVLS]; |
65 | static struct lock_class_key rcu_fqs_class[RCU_NUM_LVLS]; | 65 | static struct lock_class_key rcu_fqs_class[RCU_NUM_LVLS]; |
66 | 66 | ||
67 | #define RCU_STATE_INITIALIZER(sname, sabbr, cr) { \ | 67 | #define RCU_STATE_INITIALIZER(sname, sabbr, cr) \ |
68 | struct rcu_state sname##_state = { \ | ||
68 | .level = { &sname##_state.node[0] }, \ | 69 | .level = { &sname##_state.node[0] }, \ |
69 | .call = cr, \ | 70 | .call = cr, \ |
70 | .fqs_state = RCU_GP_IDLE, \ | 71 | .fqs_state = RCU_GP_IDLE, \ |
@@ -77,14 +78,11 @@ static struct lock_class_key rcu_fqs_class[RCU_NUM_LVLS]; | |||
77 | .onoff_mutex = __MUTEX_INITIALIZER(sname##_state.onoff_mutex), \ | 78 | .onoff_mutex = __MUTEX_INITIALIZER(sname##_state.onoff_mutex), \ |
78 | .name = #sname, \ | 79 | .name = #sname, \ |
79 | .abbr = sabbr, \ | 80 | .abbr = sabbr, \ |
80 | } | 81 | }; \ |
81 | 82 | DEFINE_PER_CPU(struct rcu_data, sname##_data) | |
82 | struct rcu_state rcu_sched_state = | ||
83 | RCU_STATE_INITIALIZER(rcu_sched, 's', call_rcu_sched); | ||
84 | DEFINE_PER_CPU(struct rcu_data, rcu_sched_data); | ||
85 | 83 | ||
86 | struct rcu_state rcu_bh_state = RCU_STATE_INITIALIZER(rcu_bh, 'b', call_rcu_bh); | 84 | RCU_STATE_INITIALIZER(rcu_sched, 's', call_rcu_sched); |
87 | DEFINE_PER_CPU(struct rcu_data, rcu_bh_data); | 85 | RCU_STATE_INITIALIZER(rcu_bh, 'b', call_rcu_bh); |
88 | 86 | ||
89 | static struct rcu_state *rcu_state; | 87 | static struct rcu_state *rcu_state; |
90 | LIST_HEAD(rcu_struct_flavors); | 88 | LIST_HEAD(rcu_struct_flavors); |
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h index 769e12e3151b..6976a7dde874 100644 --- a/kernel/rcutree_plugin.h +++ b/kernel/rcutree_plugin.h | |||
@@ -110,9 +110,7 @@ static void __init rcu_bootup_announce_oddness(void) | |||
110 | 110 | ||
111 | #ifdef CONFIG_TREE_PREEMPT_RCU | 111 | #ifdef CONFIG_TREE_PREEMPT_RCU |
112 | 112 | ||
113 | struct rcu_state rcu_preempt_state = | 113 | RCU_STATE_INITIALIZER(rcu_preempt, 'p', call_rcu); |
114 | RCU_STATE_INITIALIZER(rcu_preempt, 'p', call_rcu); | ||
115 | DEFINE_PER_CPU(struct rcu_data, rcu_preempt_data); | ||
116 | static struct rcu_state *rcu_state = &rcu_preempt_state; | 114 | static struct rcu_state *rcu_state = &rcu_preempt_state; |
117 | 115 | ||
118 | static int rcu_preempted_readers_exp(struct rcu_node *rnp); | 116 | static int rcu_preempted_readers_exp(struct rcu_node *rnp); |