aboutsummaryrefslogtreecommitdiffstats
path: root/arch/frv/include/asm/atomic.h
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2010-05-17 00:33:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-17 10:57:27 -0400
commitf3d46f9d3194e0329216002a8724d4c0957abc79 (patch)
tree6d9413e4a448d7b8d342c40297c4fbe0b9c4c2f0 /arch/frv/include/asm/atomic.h
parente40152ee1e1c7a63f4777791863215e3faa37a86 (diff)
atomic_t: Cast to volatile when accessing atomic variables
In preparation for removing volatile from the atomic_t definition, this patch adds a volatile cast to all the atomic read functions. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/frv/include/asm/atomic.h')
-rw-r--r--arch/frv/include/asm/atomic.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/frv/include/asm/atomic.h b/arch/frv/include/asm/atomic.h
index 00a57af79afc..fae32c7fdcb6 100644
--- a/arch/frv/include/asm/atomic.h
+++ b/arch/frv/include/asm/atomic.h
@@ -36,7 +36,7 @@
36#define smp_mb__after_atomic_inc() barrier() 36#define smp_mb__after_atomic_inc() barrier()
37 37
38#define ATOMIC_INIT(i) { (i) } 38#define ATOMIC_INIT(i) { (i) }
39#define atomic_read(v) ((v)->counter) 39#define atomic_read(v) (*(volatile int *)&(v)->counter)
40#define atomic_set(v, i) (((v)->counter) = (i)) 40#define atomic_set(v, i) (((v)->counter) = (i))
41 41
42#ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS 42#ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS