From b5b714ef13ef567387870113003ac9801ddcc790 Mon Sep 17 00:00:00 2001 From: Hajime Tazaki Date: Sat, 19 Dec 2015 10:58:19 +0900 Subject: [PATCH] lib: override smp_load_acquire() to quiet complier assert Signed-off-by: Hajime Tazaki --- arch/lib/include/asm/barrier.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/lib/include/asm/barrier.h b/arch/lib/include/asm/barrier.h index 47adcc659b50..9fa3e759970d 100644 --- a/arch/lib/include/asm/barrier.h +++ b/arch/lib/include/asm/barrier.h @@ -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; \ +})