summaryrefslogtreecommitdiffstats
path: root/arch/tile
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2011-02-25 08:46:38 -0500
committerChris Metcalf <cmetcalf@tilera.com>2011-02-25 08:46:38 -0500
commitd356b595e5a95c0c2305ec0a7d1cdb3e26f57716 (patch)
tree8256f0460d6ff5f50d57590a53c10336b66cb241 /arch/tile
parentdeb4b003eb33e63af23cd887ded04ad77ab3dcbb (diff)
downloadop-kernel-dev-d356b595e5a95c0c2305ec0a7d1cdb3e26f57716.zip
op-kernel-dev-d356b595e5a95c0c2305ec0a7d1cdb3e26f57716.tar.gz
arch/tile: Fix atomic_read() definition to use ACCESS_ONCE
This adds the volatile cast which forces the compiler to emit the load. Suggested by Peter Zijlstra <peterz@infradead.org>. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile')
-rw-r--r--arch/tile/include/asm/atomic.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/tile/include/asm/atomic.h b/arch/tile/include/asm/atomic.h
index b8c49f9..75a1602 100644
--- a/arch/tile/include/asm/atomic.h
+++ b/arch/tile/include/asm/atomic.h
@@ -32,7 +32,7 @@
*/
static inline int atomic_read(const atomic_t *v)
{
- return v->counter;
+ return ACCESS_ONCE(v->counter);
}
/**
OpenPOWER on IntegriCloud