diff options
Diffstat (limited to 'include/linux/rcutree.h')
-rw-r--r-- | include/linux/rcutree.h | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index a0852d0d915b..8a0222ce3b13 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
@@ -36,38 +36,20 @@ extern void rcu_bh_qs(int cpu); | |||
36 | extern int rcu_pending(int cpu); | 36 | extern int rcu_pending(int cpu); |
37 | extern int rcu_needs_cpu(int cpu); | 37 | extern int rcu_needs_cpu(int cpu); |
38 | 38 | ||
39 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
40 | extern struct lockdep_map rcu_lock_map; | ||
41 | # define rcu_read_acquire() \ | ||
42 | lock_acquire(&rcu_lock_map, 0, 0, 2, 1, NULL, _THIS_IP_) | ||
43 | # define rcu_read_release() lock_release(&rcu_lock_map, 1, _THIS_IP_) | ||
44 | #else | ||
45 | # define rcu_read_acquire() do { } while (0) | ||
46 | # define rcu_read_release() do { } while (0) | ||
47 | #endif | ||
48 | |||
49 | static inline void __rcu_read_lock(void) | 39 | static inline void __rcu_read_lock(void) |
50 | { | 40 | { |
51 | preempt_disable(); | 41 | preempt_disable(); |
52 | __acquire(RCU); | ||
53 | rcu_read_acquire(); | ||
54 | } | 42 | } |
55 | static inline void __rcu_read_unlock(void) | 43 | static inline void __rcu_read_unlock(void) |
56 | { | 44 | { |
57 | rcu_read_release(); | ||
58 | __release(RCU); | ||
59 | preempt_enable(); | 45 | preempt_enable(); |
60 | } | 46 | } |
61 | static inline void __rcu_read_lock_bh(void) | 47 | static inline void __rcu_read_lock_bh(void) |
62 | { | 48 | { |
63 | local_bh_disable(); | 49 | local_bh_disable(); |
64 | __acquire(RCU_BH); | ||
65 | rcu_read_acquire(); | ||
66 | } | 50 | } |
67 | static inline void __rcu_read_unlock_bh(void) | 51 | static inline void __rcu_read_unlock_bh(void) |
68 | { | 52 | { |
69 | rcu_read_release(); | ||
70 | __release(RCU_BH); | ||
71 | local_bh_enable(); | 53 | local_bh_enable(); |
72 | } | 54 | } |
73 | 55 | ||