mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
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>
This commit is contained in:
parent
deb4b003eb
commit
d356b595e5
|
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
static inline int atomic_read(const atomic_t *v)
|
||||
{
|
||||
return v->counter;
|
||||
return ACCESS_ONCE(v->counter);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user