rcu: Move RCU_BOOST declarations to allow compiler checking
authorPaul E. McKenney <paul.mckenney@linaro.org>
Tue, 21 Jun 2011 08:59:33 +0000 (01:59 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Thu, 29 Sep 2011 04:38:18 +0000 (21:38 -0700)
Andi Kleen noticed that one of the RCU_BOOST data declarations was
out of sync with the definition.  Move the declarations so that the
compiler can do the checking in the future.

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcutree.h
kernel/rcutree_trace.c

index 01b2ccda26fbf82880cc1d4a50bf9f2877e91bba..eee6c9406b46c31ea8c5bb4f9b5855ffa561a2c0 100644 (file)
@@ -417,6 +417,13 @@ extern struct rcu_state rcu_preempt_state;
 DECLARE_PER_CPU(struct rcu_data, rcu_preempt_data);
 #endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
 
+#ifdef CONFIG_RCU_BOOST
+DECLARE_PER_CPU(unsigned int, rcu_cpu_kthread_status);
+DECLARE_PER_CPU(int, rcu_cpu_kthread_cpu);
+DECLARE_PER_CPU(unsigned int, rcu_cpu_kthread_loops);
+DECLARE_PER_CPU(char, rcu_cpu_has_work);
+#endif /* #ifdef CONFIG_RCU_BOOST */
+
 #ifndef RCU_TREE_NONCORE
 
 /* Forward declarations for rcutree_plugin.h */
index 0a5a8bedc52203c2152452c076e7198211c46d49..f328ed1c6e46103961d85fff3020fe347cdca036 100644 (file)
 
 #ifdef CONFIG_RCU_BOOST
 
-DECLARE_PER_CPU(unsigned int, rcu_cpu_kthread_status);
-DECLARE_PER_CPU(int, rcu_cpu_kthread_cpu);
-DECLARE_PER_CPU(unsigned int, rcu_cpu_kthread_loops);
-DECLARE_PER_CPU(char, rcu_cpu_has_work);
-
 static char convert_kthread_status(unsigned int kthread_status)
 {
        if (kthread_status > RCU_KTHREAD_MAX)