aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/include/asm/atomic.h')
-rw-r--r--arch/mips/include/asm/atomic.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h
index 519197ede089..59dc0c7ef733 100644
--- a/arch/mips/include/asm/atomic.h
+++ b/arch/mips/include/asm/atomic.h
@@ -29,7 +29,7 @@
29 * 29 *
30 * Atomically reads the value of @v. 30 * Atomically reads the value of @v.
31 */ 31 */
32#define atomic_read(v) ((v)->counter) 32#define atomic_read(v) (*(volatile int *)&(v)->counter)
33 33
34/* 34/*
35 * atomic_set - set atomic variable 35 * atomic_set - set atomic variable
@@ -410,7 +410,7 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
410 * @v: pointer of type atomic64_t 410 * @v: pointer of type atomic64_t
411 * 411 *
412 */ 412 */
413#define atomic64_read(v) ((v)->counter) 413#define atomic64_read(v) (*(volatile long *)&(v)->counter)
414 414
415/* 415/*
416 * atomic64_set - set atomic variable 416 * atomic64_set - set atomic variable