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; \ +})