[<prev] [next>] [day] [month] [year] [list]
Message-Id: <201103011931.p21JV3uD010192@farm-0010.internal.tilera.com>
Date: Fri, 25 Feb 2011 08:46:38 -0500
From: Chris Metcalf <cmetcalf@...era.com>
To: linux-kernel@...r.kernel.org
Subject: [PATCH] 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@...radead.org>.
Signed-off-by: Chris Metcalf <cmetcalf@...era.com>
---
arch/tile/include/asm/atomic.h | 2 +-
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);
}
/**
--
1.6.5.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists