arm64: barriers: use barrier() instead of smp_mb() when !SMP
authorWill Deacon <will.deacon@arm.com>
Fri, 2 May 2014 15:24:12 +0000 (16:24 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 9 May 2014 16:03:52 +0000 (17:03 +0100)
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>
arch/arm64/include/asm/barrier.h

index 71a42d6..709f1f6 100644 (file)
@@ -40,7 +40,7 @@
 #define smp_store_release(p, v)                                                \
 do {                                                                   \
        compiletime_assert_atomic_type(*p);                             \
-       smp_mb();                                                       \
+       barrier();                                                      \
        ACCESS_ONCE(*p) = (v);                                          \
 } while (0)
 
@@ -48,7 +48,7 @@ do {                                                                  \
 ({                                                                     \
        typeof(*p) ___p1 = ACCESS_ONCE(*p);                             \
        compiletime_assert_atomic_type(*p);                             \
-       smp_mb();                                                       \
+       barrier();                                                      \
        ___p1;                                                          \
 })