diff options
-rw-r--r-- | include/linux/rcupdate.h | 53 |
1 files changed, 8 insertions, 45 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index d201c155f70c..5dd6fd8b3203 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -250,41 +250,8 @@ static inline void rcu_lock_release(struct lockdep_map *map) | |||
250 | } | 250 | } |
251 | 251 | ||
252 | extern struct lockdep_map rcu_lock_map; | 252 | extern struct lockdep_map rcu_lock_map; |
253 | |||
254 | static inline void rcu_read_acquire(void) | ||
255 | { | ||
256 | rcu_lock_acquire(&rcu_lock_map); | ||
257 | } | ||
258 | |||
259 | static inline void rcu_read_release(void) | ||
260 | { | ||
261 | rcu_lock_release(&rcu_lock_map); | ||
262 | } | ||
263 | |||
264 | extern struct lockdep_map rcu_bh_lock_map; | 253 | extern struct lockdep_map rcu_bh_lock_map; |
265 | |||
266 | static inline void rcu_read_acquire_bh(void) | ||
267 | { | ||
268 | rcu_lock_acquire(&rcu_bh_lock_map); | ||
269 | } | ||
270 | |||
271 | static inline void rcu_read_release_bh(void) | ||
272 | { | ||
273 | rcu_lock_release(&rcu_bh_lock_map); | ||
274 | } | ||
275 | |||
276 | extern struct lockdep_map rcu_sched_lock_map; | 254 | extern struct lockdep_map rcu_sched_lock_map; |
277 | |||
278 | static inline void rcu_read_acquire_sched(void) | ||
279 | { | ||
280 | rcu_lock_acquire(&rcu_sched_lock_map); | ||
281 | } | ||
282 | |||
283 | static inline void rcu_read_release_sched(void) | ||
284 | { | ||
285 | rcu_lock_release(&rcu_sched_lock_map); | ||
286 | } | ||
287 | |||
288 | extern int debug_lockdep_rcu_enabled(void); | 255 | extern int debug_lockdep_rcu_enabled(void); |
289 | 256 | ||
290 | /** | 257 | /** |
@@ -364,12 +331,8 @@ static inline int rcu_read_lock_sched_held(void) | |||
364 | 331 | ||
365 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | 332 | #else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */ |
366 | 333 | ||
367 | # define rcu_read_acquire() do { } while (0) | 334 | # define rcu_lock_acquire(a) do { } while (0) |
368 | # define rcu_read_release() do { } while (0) | 335 | # define rcu_lock_release(a) do { } while (0) |
369 | # define rcu_read_acquire_bh() do { } while (0) | ||
370 | # define rcu_read_release_bh() do { } while (0) | ||
371 | # define rcu_read_acquire_sched() do { } while (0) | ||
372 | # define rcu_read_release_sched() do { } while (0) | ||
373 | 336 | ||
374 | static inline int rcu_read_lock_held(void) | 337 | static inline int rcu_read_lock_held(void) |
375 | { | 338 | { |
@@ -690,7 +653,7 @@ static inline void rcu_read_lock(void) | |||
690 | { | 653 | { |
691 | __rcu_read_lock(); | 654 | __rcu_read_lock(); |
692 | __acquire(RCU); | 655 | __acquire(RCU); |
693 | rcu_read_acquire(); | 656 | rcu_lock_acquire(&rcu_lock_map); |
694 | } | 657 | } |
695 | 658 | ||
696 | /* | 659 | /* |
@@ -710,7 +673,7 @@ static inline void rcu_read_lock(void) | |||
710 | */ | 673 | */ |
711 | static inline void rcu_read_unlock(void) | 674 | static inline void rcu_read_unlock(void) |
712 | { | 675 | { |
713 | rcu_read_release(); | 676 | rcu_lock_release(&rcu_lock_map); |
714 | __release(RCU); | 677 | __release(RCU); |
715 | __rcu_read_unlock(); | 678 | __rcu_read_unlock(); |
716 | } | 679 | } |
@@ -731,7 +694,7 @@ static inline void rcu_read_lock_bh(void) | |||
731 | { | 694 | { |
732 | local_bh_disable(); | 695 | local_bh_disable(); |
733 | __acquire(RCU_BH); | 696 | __acquire(RCU_BH); |
734 | rcu_read_acquire_bh(); | 697 | rcu_lock_acquire(&rcu_bh_lock_map); |
735 | } | 698 | } |
736 | 699 | ||
737 | /* | 700 | /* |
@@ -741,7 +704,7 @@ static inline void rcu_read_lock_bh(void) | |||
741 | */ | 704 | */ |
742 | static inline void rcu_read_unlock_bh(void) | 705 | static inline void rcu_read_unlock_bh(void) |
743 | { | 706 | { |
744 | rcu_read_release_bh(); | 707 | rcu_lock_release(&rcu_bh_lock_map); |
745 | __release(RCU_BH); | 708 | __release(RCU_BH); |
746 | local_bh_enable(); | 709 | local_bh_enable(); |
747 | } | 710 | } |
@@ -758,7 +721,7 @@ static inline void rcu_read_lock_sched(void) | |||
758 | { | 721 | { |
759 | preempt_disable(); | 722 | preempt_disable(); |
760 | __acquire(RCU_SCHED); | 723 | __acquire(RCU_SCHED); |
761 | rcu_read_acquire_sched(); | 724 | rcu_lock_acquire(&rcu_sched_lock_map); |
762 | } | 725 | } |
763 | 726 | ||
764 | /* Used by lockdep and tracing: cannot be traced, cannot call lockdep. */ | 727 | /* Used by lockdep and tracing: cannot be traced, cannot call lockdep. */ |
@@ -775,7 +738,7 @@ static inline notrace void rcu_read_lock_sched_notrace(void) | |||
775 | */ | 738 | */ |
776 | static inline void rcu_read_unlock_sched(void) | 739 | static inline void rcu_read_unlock_sched(void) |
777 | { | 740 | { |
778 | rcu_read_release_sched(); | 741 | rcu_lock_release(&rcu_sched_lock_map); |
779 | __release(RCU_SCHED); | 742 | __release(RCU_SCHED); |
780 | preempt_enable(); | 743 | preempt_enable(); |
781 | } | 744 | } |