projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
deb4b00
)
arch/tile: Fix atomic_read() definition to use ACCESS_ONCE
author
Chris Metcalf
<cmetcalf@tilera.com>
Fri, 25 Feb 2011 13:46:38 +0000
(08:46 -0500)
committer
Chris Metcalf
<cmetcalf@tilera.com>
Fri, 25 Feb 2011 13:46:38 +0000
(08:46 -0500)
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>
arch/tile/include/asm/atomic.h
patch
|
blob
|
history
diff --git
a/arch/tile/include/asm/atomic.h
b/arch/tile/include/asm/atomic.h
index b8c49f98a44c3b945c2a0addeb62e30957215881..75a16028a95294ebfb67fbcca5e3c0b404a57bcb 100644
(file)
--- 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)
;
}
/**