diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/buffer_head.h | 2 | ||||
| -rw-r--r-- | include/linux/genhd.h | 2 | ||||
| -rw-r--r-- | include/linux/interrupt.h | 8 | ||||
| -rw-r--r-- | include/linux/netdevice.h | 2 | ||||
| -rw-r--r-- | include/linux/sched.h | 6 | ||||
| -rw-r--r-- | include/linux/sunrpc/sched.h | 8 | ||||
| -rw-r--r-- | include/linux/sunrpc/xprt.h | 8 | ||||
| -rw-r--r-- | include/linux/tracehook.h | 2 |
8 files changed, 18 insertions, 20 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index c40302f909ce..7cbf837a279c 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
| @@ -278,7 +278,7 @@ static inline void get_bh(struct buffer_head *bh) | |||
| 278 | 278 | ||
| 279 | static inline void put_bh(struct buffer_head *bh) | 279 | static inline void put_bh(struct buffer_head *bh) |
| 280 | { | 280 | { |
| 281 | smp_mb__before_atomic_dec(); | 281 | smp_mb__before_atomic(); |
| 282 | atomic_dec(&bh->b_count); | 282 | atomic_dec(&bh->b_count); |
| 283 | } | 283 | } |
| 284 | 284 | ||
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 9f3c275e053e..ec274e0f4ed2 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
| @@ -649,7 +649,7 @@ static inline void hd_ref_init(struct hd_struct *part) | |||
| 649 | static inline void hd_struct_get(struct hd_struct *part) | 649 | static inline void hd_struct_get(struct hd_struct *part) |
| 650 | { | 650 | { |
| 651 | atomic_inc(&part->ref); | 651 | atomic_inc(&part->ref); |
| 652 | smp_mb__after_atomic_inc(); | 652 | smp_mb__after_atomic(); |
| 653 | } | 653 | } |
| 654 | 654 | ||
| 655 | static inline int hd_struct_try_get(struct hd_struct *part) | 655 | static inline int hd_struct_try_get(struct hd_struct *part) |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index c7bfac1c4a7b..157111043281 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -453,7 +453,7 @@ static inline int tasklet_trylock(struct tasklet_struct *t) | |||
| 453 | 453 | ||
| 454 | static inline void tasklet_unlock(struct tasklet_struct *t) | 454 | static inline void tasklet_unlock(struct tasklet_struct *t) |
| 455 | { | 455 | { |
| 456 | smp_mb__before_clear_bit(); | 456 | smp_mb__before_atomic(); |
| 457 | clear_bit(TASKLET_STATE_RUN, &(t)->state); | 457 | clear_bit(TASKLET_STATE_RUN, &(t)->state); |
| 458 | } | 458 | } |
| 459 | 459 | ||
| @@ -501,7 +501,7 @@ static inline void tasklet_hi_schedule_first(struct tasklet_struct *t) | |||
| 501 | static inline void tasklet_disable_nosync(struct tasklet_struct *t) | 501 | static inline void tasklet_disable_nosync(struct tasklet_struct *t) |
| 502 | { | 502 | { |
| 503 | atomic_inc(&t->count); | 503 | atomic_inc(&t->count); |
| 504 | smp_mb__after_atomic_inc(); | 504 | smp_mb__after_atomic(); |
| 505 | } | 505 | } |
| 506 | 506 | ||
| 507 | static inline void tasklet_disable(struct tasklet_struct *t) | 507 | static inline void tasklet_disable(struct tasklet_struct *t) |
| @@ -513,13 +513,13 @@ static inline void tasklet_disable(struct tasklet_struct *t) | |||
| 513 | 513 | ||
| 514 | static inline void tasklet_enable(struct tasklet_struct *t) | 514 | static inline void tasklet_enable(struct tasklet_struct *t) |
| 515 | { | 515 | { |
| 516 | smp_mb__before_atomic_dec(); | 516 | smp_mb__before_atomic(); |
| 517 | atomic_dec(&t->count); | 517 | atomic_dec(&t->count); |
| 518 | } | 518 | } |
| 519 | 519 | ||
| 520 | static inline void tasklet_hi_enable(struct tasklet_struct *t) | 520 | static inline void tasklet_hi_enable(struct tasklet_struct *t) |
| 521 | { | 521 | { |
| 522 | smp_mb__before_atomic_dec(); | 522 | smp_mb__before_atomic(); |
| 523 | atomic_dec(&t->count); | 523 | atomic_dec(&t->count); |
| 524 | } | 524 | } |
| 525 | 525 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 7ed3a3aa6604..616415a4fee4 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -493,7 +493,7 @@ static inline void napi_disable(struct napi_struct *n) | |||
| 493 | static inline void napi_enable(struct napi_struct *n) | 493 | static inline void napi_enable(struct napi_struct *n) |
| 494 | { | 494 | { |
| 495 | BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state)); | 495 | BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state)); |
| 496 | smp_mb__before_clear_bit(); | 496 | smp_mb__before_atomic(); |
| 497 | clear_bit(NAPI_STATE_SCHED, &n->state); | 497 | clear_bit(NAPI_STATE_SCHED, &n->state); |
| 498 | } | 498 | } |
| 499 | 499 | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 25f54c79f757..010cde3b44cb 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -2782,10 +2782,8 @@ static inline bool __must_check current_set_polling_and_test(void) | |||
| 2782 | /* | 2782 | /* |
| 2783 | * Polling state must be visible before we test NEED_RESCHED, | 2783 | * Polling state must be visible before we test NEED_RESCHED, |
| 2784 | * paired by resched_task() | 2784 | * paired by resched_task() |
| 2785 | * | ||
| 2786 | * XXX: assumes set/clear bit are identical barrier wise. | ||
| 2787 | */ | 2785 | */ |
| 2788 | smp_mb__after_clear_bit(); | 2786 | smp_mb__after_atomic(); |
| 2789 | 2787 | ||
| 2790 | return unlikely(tif_need_resched()); | 2788 | return unlikely(tif_need_resched()); |
| 2791 | } | 2789 | } |
| @@ -2803,7 +2801,7 @@ static inline bool __must_check current_clr_polling_and_test(void) | |||
| 2803 | * Polling state must be visible before we test NEED_RESCHED, | 2801 | * Polling state must be visible before we test NEED_RESCHED, |
| 2804 | * paired by resched_task() | 2802 | * paired by resched_task() |
| 2805 | */ | 2803 | */ |
| 2806 | smp_mb__after_clear_bit(); | 2804 | smp_mb__after_atomic(); |
| 2807 | 2805 | ||
| 2808 | return unlikely(tif_need_resched()); | 2806 | return unlikely(tif_need_resched()); |
| 2809 | } | 2807 | } |
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 3a847de83fab..ad7dbe2cfecd 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
| @@ -142,18 +142,18 @@ struct rpc_task_setup { | |||
| 142 | test_and_set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate) | 142 | test_and_set_bit(RPC_TASK_RUNNING, &(t)->tk_runstate) |
| 143 | #define rpc_clear_running(t) \ | 143 | #define rpc_clear_running(t) \ |
| 144 | do { \ | 144 | do { \ |
| 145 | smp_mb__before_clear_bit(); \ | 145 | smp_mb__before_atomic(); \ |
| 146 | clear_bit(RPC_TASK_RUNNING, &(t)->tk_runstate); \ | 146 | clear_bit(RPC_TASK_RUNNING, &(t)->tk_runstate); \ |
| 147 | smp_mb__after_clear_bit(); \ | 147 | smp_mb__after_atomic(); \ |
| 148 | } while (0) | 148 | } while (0) |
| 149 | 149 | ||
| 150 | #define RPC_IS_QUEUED(t) test_bit(RPC_TASK_QUEUED, &(t)->tk_runstate) | 150 | #define RPC_IS_QUEUED(t) test_bit(RPC_TASK_QUEUED, &(t)->tk_runstate) |
| 151 | #define rpc_set_queued(t) set_bit(RPC_TASK_QUEUED, &(t)->tk_runstate) | 151 | #define rpc_set_queued(t) set_bit(RPC_TASK_QUEUED, &(t)->tk_runstate) |
| 152 | #define rpc_clear_queued(t) \ | 152 | #define rpc_clear_queued(t) \ |
| 153 | do { \ | 153 | do { \ |
| 154 | smp_mb__before_clear_bit(); \ | 154 | smp_mb__before_atomic(); \ |
| 155 | clear_bit(RPC_TASK_QUEUED, &(t)->tk_runstate); \ | 155 | clear_bit(RPC_TASK_QUEUED, &(t)->tk_runstate); \ |
| 156 | smp_mb__after_clear_bit(); \ | 156 | smp_mb__after_atomic(); \ |
| 157 | } while (0) | 157 | } while (0) |
| 158 | 158 | ||
| 159 | #define RPC_IS_ACTIVATED(t) test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate) | 159 | #define RPC_IS_ACTIVATED(t) test_bit(RPC_TASK_ACTIVE, &(t)->tk_runstate) |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 3e5efb2b236e..3876f0f1dfd3 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
| @@ -379,9 +379,9 @@ static inline int xprt_test_and_clear_connected(struct rpc_xprt *xprt) | |||
| 379 | 379 | ||
| 380 | static inline void xprt_clear_connecting(struct rpc_xprt *xprt) | 380 | static inline void xprt_clear_connecting(struct rpc_xprt *xprt) |
| 381 | { | 381 | { |
| 382 | smp_mb__before_clear_bit(); | 382 | smp_mb__before_atomic(); |
| 383 | clear_bit(XPRT_CONNECTING, &xprt->state); | 383 | clear_bit(XPRT_CONNECTING, &xprt->state); |
| 384 | smp_mb__after_clear_bit(); | 384 | smp_mb__after_atomic(); |
| 385 | } | 385 | } |
| 386 | 386 | ||
| 387 | static inline int xprt_connecting(struct rpc_xprt *xprt) | 387 | static inline int xprt_connecting(struct rpc_xprt *xprt) |
| @@ -411,9 +411,9 @@ static inline void xprt_clear_bound(struct rpc_xprt *xprt) | |||
| 411 | 411 | ||
| 412 | static inline void xprt_clear_binding(struct rpc_xprt *xprt) | 412 | static inline void xprt_clear_binding(struct rpc_xprt *xprt) |
| 413 | { | 413 | { |
| 414 | smp_mb__before_clear_bit(); | 414 | smp_mb__before_atomic(); |
| 415 | clear_bit(XPRT_BINDING, &xprt->state); | 415 | clear_bit(XPRT_BINDING, &xprt->state); |
| 416 | smp_mb__after_clear_bit(); | 416 | smp_mb__after_atomic(); |
| 417 | } | 417 | } |
| 418 | 418 | ||
| 419 | static inline int xprt_test_and_set_binding(struct rpc_xprt *xprt) | 419 | static inline int xprt_test_and_set_binding(struct rpc_xprt *xprt) |
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h index 1e98b5530425..6f8ab7da27c4 100644 --- a/include/linux/tracehook.h +++ b/include/linux/tracehook.h | |||
| @@ -191,7 +191,7 @@ static inline void tracehook_notify_resume(struct pt_regs *regs) | |||
| 191 | * pairs with task_work_add()->set_notify_resume() after | 191 | * pairs with task_work_add()->set_notify_resume() after |
| 192 | * hlist_add_head(task->task_works); | 192 | * hlist_add_head(task->task_works); |
| 193 | */ | 193 | */ |
| 194 | smp_mb__after_clear_bit(); | 194 | smp_mb__after_atomic(); |
| 195 | if (unlikely(current->task_works)) | 195 | if (unlikely(current->task_works)) |
| 196 | task_work_run(); | 196 | task_work_run(); |
| 197 | } | 197 | } |
