forked from luck/tmp_suning_uos_patched
arm64: barriers: use barrier() instead of smp_mb() when !SMP
The recently introduced acquire/release accessors refer to smp_mb() in the !CONFIG_SMP case. This is confusing when reading the code, so use barrier() directly when we know we're UP. Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
This commit is contained in:
parent
493e68747e
commit
be6209a610
@ -40,7 +40,7 @@
|
|||||||
#define smp_store_release(p, v) \
|
#define smp_store_release(p, v) \
|
||||||
do { \
|
do { \
|
||||||
compiletime_assert_atomic_type(*p); \
|
compiletime_assert_atomic_type(*p); \
|
||||||
smp_mb(); \
|
barrier(); \
|
||||||
ACCESS_ONCE(*p) = (v); \
|
ACCESS_ONCE(*p) = (v); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ do { \
|
|||||||
({ \
|
({ \
|
||||||
typeof(*p) ___p1 = ACCESS_ONCE(*p); \
|
typeof(*p) ___p1 = ACCESS_ONCE(*p); \
|
||||||
compiletime_assert_atomic_type(*p); \
|
compiletime_assert_atomic_type(*p); \
|
||||||
smp_mb(); \
|
barrier(); \
|
||||||
___p1; \
|
___p1; \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user