diff options
author | David Howells <dhowells@redhat.com> | 2011-03-14 14:49:44 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2011-03-14 14:51:25 +0000 |
commit | af794206542e03d62138a107ee0ffb5e7d631881 (patch) | |
tree | 58e951a8a37b6ac4d854a7d501dd3b9ff5126e44 /arch/mn10300 | |
parent | dcca52c21e44aa69713390d6872c425b21df3abe (diff) | |
download | kernel_samsung_smdk4412-af794206542e03d62138a107ee0ffb5e7d631881.zip kernel_samsung_smdk4412-af794206542e03d62138a107ee0ffb5e7d631881.tar.gz kernel_samsung_smdk4412-af794206542e03d62138a107ee0ffb5e7d631881.tar.bz2 |
MN10300: atomic_read() should ensure it emits a load
atomic_read() needs to ensure that it emits a load (which it can do by using
ACCESS_ONCE()).
Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'arch/mn10300')
-rw-r--r-- | arch/mn10300/include/asm/atomic.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mn10300/include/asm/atomic.h b/arch/mn10300/include/asm/atomic.h index 92d2f92..9d773a6 100644 --- a/arch/mn10300/include/asm/atomic.h +++ b/arch/mn10300/include/asm/atomic.h @@ -139,7 +139,7 @@ static inline unsigned long __cmpxchg(volatile unsigned long *m, * Atomically reads the value of @v. Note that the guaranteed * useful range of an atomic_t is only 24 bits. */ -#define atomic_read(v) ((v)->counter) +#define atomic_read(v) (ACCESS_ONCE((v)->counter)) /** * atomic_set - set atomic variable |