Skip to content

Commit

Permalink
lib: override smp_load_acquire() to quiet complier assert
Browse files Browse the repository at this point in the history
Signed-off-by: Hajime Tazaki <[email protected]>
  • Loading branch information
thehajime committed Dec 19, 2015
1 parent 25f480c commit b5b714e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/lib/include/asm/barrier.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,11 @@
smp_mb(); \
ACCESS_ONCE(*p) = (v); \
} while (0)

#undef smp_load_acquire
#define smp_load_acquire(p) \
({ \
typeof(*p) ___p1 = READ_ONCE(*p); \
smp_mb(); \
___p1; \
})

0 comments on commit b5b714e

Please sign in to comment.