diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-07-26 14:44:26 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-07-26 14:44:26 -0400 |
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; | |||
139 | #define vectors_high() (0) | 139 | #define vectors_high() (0) |
140 | #endif | 140 | #endif |
141 | 141 | ||
142 | #if __LINUX_ARM_ARCH__ >= 6 | ||
143 | #define mb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \ | ||
144 | : : "r" (0) : "memory") | ||
145 | #else | ||
142 | #define mb() __asm__ __volatile__ ("" : : : "memory") | 146 | #define mb() __asm__ __volatile__ ("" : : : "memory") |
147 | #endif | ||
143 | #define rmb() mb() | 148 | #define rmb() mb() |
144 | #define wmb() mb() | 149 | #define wmb() mb() |
145 | #define read_barrier_depends() do { } while(0) | 150 | #define read_barrier_depends() do { } while(0) |