summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/s390/include/asm/atomic.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/s390/include/asm/atomic.h b/arch/s390/include/asm/atomic.h
index 76daea117181..50cfb5ed601b 100644
--- a/arch/s390/include/asm/atomic.h
+++ b/arch/s390/include/asm/atomic.h
@@ -36,14 +36,12 @@
static inline int atomic_read(const atomic_t *v)
{
- barrier();
- return v->counter;
+ return ACCESS_ONCE(v->counter);
}
static inline void atomic_set(atomic_t *v, int i)
{
v->counter = i;
- barrier();
}
static inline int atomic_add_return(int i, atomic_t *v)
@@ -128,14 +126,12 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u)
static inline long long atomic64_read(const atomic64_t *v)
{
- barrier();
- return v->counter;
+ return ACCESS_ONCE(v->counter);
}
static inline void atomic64_set(atomic64_t *v, long long i)
{
v->counter = i;
- barrier();
}
static inline long long atomic64_add_return(long long i, atomic64_t *v)