Commit d356b595 authored by Chris Metcalf's avatar Chris Metcalf

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: default avatarChris Metcalf <cmetcalf@tilera.com>
parent deb4b003
......@@ -32,7 +32,7 @@
*/
static inline int atomic_read(const atomic_t *v)
{
return v->counter;
return ACCESS_ONCE(v->counter);
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment