projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dcca52c
)
MN10300: atomic_read() should ensure it emits a load
author
David Howells
<dhowells@redhat.com>
Mon, 14 Mar 2011 14:49:44 +0000
(14:49 +0000)
committer
David Howells
<dhowells@redhat.com>
Mon, 14 Mar 2011 14:51:25 +0000
(14:51 +0000)
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>
arch/mn10300/include/asm/atomic.h
patch
|
blob
|
blame
|
history
diff --git
a/arch/mn10300/include/asm/atomic.h
b/arch/mn10300/include/asm/atomic.h
index 92d2f9298e3832155b14bf21d1eb964e015b87f5..9d773a639513abd3a35311a117a563912d52b236 100644
(file)
--- 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