diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-07-26 19:44:26 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-07-26 19:44:26 +0100 |
commit | 6d9b37a3a80195d317887ff81aad6a58a66954b5 (patch) | |
tree | 98d1c96416b660070b1fd37dbbc0c80d39c55b98 /include/asm-arm/system.h | |
parent | 9560782f9a68a5de3e72bc3ba71317f373844549 (diff) |
[PATCH] ARM SMP: Add ARMv6 memory barriers
Convert explicit gcc asm-based memory barriers into smp_mb() calls.
These change between barrier() and the ARMv6 data memory barrier
instruction depending on whether ARMv6 SMP is enabled.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/system.h')
-rw-r--r-- | include/asm-arm/system.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index 3f9c3626a73c..8efa4ebdcacb 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h @@ -139,7 +139,12 @@ extern unsigned int user_debug; #define vectors_high() (0) #endif +#if __LINUX_ARM_ARCH__ >= 6 +#define mb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \ + : : "r" (0) : "memory") +#else #define mb() __asm__ __volatile__ ("" : : : "memory") +#endif #define rmb() mb() #define wmb() mb() #define read_barrier_depends() do { } while(0) |