diff options
| author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-09-02 15:30:58 -0400 |
|---|---|---|
| committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-10-28 16:49:28 -0400 |
| commit | 61cfd0970ea27764434fba5c41bdaefb26c44183 (patch) | |
| tree | 302b7b47a56aa179a4a7a77f019d87e34d1ab52d | |
| parent | 4568779f7143f88fc5fbe7a8d619653e28f24ad1 (diff) | |
rcu: Move RCU_BOOST variable declarations, eliminating #ifdef
There are some RCU_BOOST-specific per-CPU variable declarations that
are needlessly defined under #ifdef in kernel/rcu/tree.c. This commit
therefore moves these declarations into a pre-existing #ifdef in
kernel/rcu/tree_plugin.h.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
| -rw-r--r-- | kernel/rcu/tree.c | 13 | ||||
| -rw-r--r-- | kernel/rcu/tree_plugin.h | 17 |
2 files changed, 15 insertions, 15 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 9815447d22e0..7f73c5edf8cf 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
| @@ -152,19 +152,6 @@ EXPORT_SYMBOL_GPL(rcu_scheduler_active); | |||
| 152 | */ | 152 | */ |
| 153 | static int rcu_scheduler_fully_active __read_mostly; | 153 | static int rcu_scheduler_fully_active __read_mostly; |
| 154 | 154 | ||
| 155 | #ifdef CONFIG_RCU_BOOST | ||
| 156 | |||
| 157 | /* | ||
| 158 | * Control variables for per-CPU and per-rcu_node kthreads. These | ||
| 159 | * handle all flavors of RCU. | ||
| 160 | */ | ||
| 161 | static DEFINE_PER_CPU(struct task_struct *, rcu_cpu_kthread_task); | ||
| 162 | DEFINE_PER_CPU(unsigned int, rcu_cpu_kthread_status); | ||
| 163 | DEFINE_PER_CPU(unsigned int, rcu_cpu_kthread_loops); | ||
| 164 | DEFINE_PER_CPU(char, rcu_cpu_has_work); | ||
| 165 | |||
| 166 | #endif /* #ifdef CONFIG_RCU_BOOST */ | ||
| 167 | |||
| 168 | static void rcu_boost_kthread_setaffinity(struct rcu_node *rnp, int outgoingcpu); | 155 | static void rcu_boost_kthread_setaffinity(struct rcu_node *rnp, int outgoingcpu); |
| 169 | static void invoke_rcu_core(void); | 156 | static void invoke_rcu_core(void); |
| 170 | static void invoke_rcu_callbacks(struct rcu_state *rsp, struct rcu_data *rdp); | 157 | static void invoke_rcu_callbacks(struct rcu_state *rsp, struct rcu_data *rdp); |
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index c1d7f27bd38f..357891104ea0 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h | |||
| @@ -33,11 +33,24 @@ | |||
| 33 | #define RCU_KTHREAD_PRIO 1 | 33 | #define RCU_KTHREAD_PRIO 1 |
| 34 | 34 | ||
| 35 | #ifdef CONFIG_RCU_BOOST | 35 | #ifdef CONFIG_RCU_BOOST |
| 36 | |||
| 36 | #include "../locking/rtmutex_common.h" | 37 | #include "../locking/rtmutex_common.h" |
| 37 | #define RCU_BOOST_PRIO CONFIG_RCU_BOOST_PRIO | 38 | #define RCU_BOOST_PRIO CONFIG_RCU_BOOST_PRIO |
| 38 | #else | 39 | |
| 40 | /* | ||
| 41 | * Control variables for per-CPU and per-rcu_node kthreads. These | ||
| 42 | * handle all flavors of RCU. | ||
| 43 | */ | ||
| 44 | static DEFINE_PER_CPU(struct task_struct *, rcu_cpu_kthread_task); | ||
| 45 | DEFINE_PER_CPU(unsigned int, rcu_cpu_kthread_status); | ||
| 46 | DEFINE_PER_CPU(unsigned int, rcu_cpu_kthread_loops); | ||
| 47 | DEFINE_PER_CPU(char, rcu_cpu_has_work); | ||
| 48 | |||
| 49 | #else /* #ifdef CONFIG_RCU_BOOST */ | ||
| 50 | |||
| 39 | #define RCU_BOOST_PRIO RCU_KTHREAD_PRIO | 51 | #define RCU_BOOST_PRIO RCU_KTHREAD_PRIO |
| 40 | #endif | 52 | |
| 53 | #endif /* #else #ifdef CONFIG_RCU_BOOST */ | ||
| 41 | 54 | ||
| 42 | #ifdef CONFIG_RCU_NOCB_CPU | 55 | #ifdef CONFIG_RCU_NOCB_CPU |
| 43 | static cpumask_var_t rcu_nocb_mask; /* CPUs to have callbacks offloaded. */ | 56 | static cpumask_var_t rcu_nocb_mask; /* CPUs to have callbacks offloaded. */ |
