]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/rcupreempt.h
driver core: remove no longer used "struct class_device"
[linux-2.6-omap-h63xx.git] / include / linux / rcupreempt.h
index 01152ed532c8025decbf57fbf6859273a2e3994d..8a05c7e20bc4e780c7765d34a2f9abda11436658 100644 (file)
@@ -33,8 +33,6 @@
 #ifndef __LINUX_RCUPREEMPT_H
 #define __LINUX_RCUPREEMPT_H
 
-#ifdef __KERNEL__
-
 #include <linux/cache.h>
 #include <linux/spinlock.h>
 #include <linux/threads.h>
@@ -87,15 +85,15 @@ DECLARE_PER_CPU(long, dynticks_progress_counter);
 
 static inline void rcu_enter_nohz(void)
 {
+       smp_mb(); /* CPUs seeing ++ must see prior RCU read-side crit sects */
        __get_cpu_var(dynticks_progress_counter)++;
        WARN_ON(__get_cpu_var(dynticks_progress_counter) & 0x1);
-       mb();
 }
 
 static inline void rcu_exit_nohz(void)
 {
-       mb();
        __get_cpu_var(dynticks_progress_counter)++;
+       smp_mb(); /* CPUs seeing ++ must see later RCU read-side crit sects */
        WARN_ON(!(__get_cpu_var(dynticks_progress_counter) & 0x1));
 }
 
@@ -104,5 +102,4 @@ static inline void rcu_exit_nohz(void)
 #define rcu_exit_nohz()                do { } while (0)
 #endif /* CONFIG_NO_HZ */
 
-#endif /* __KERNEL__ */
 #endif /* __LINUX_RCUPREEMPT_H */