diff options
author | Paul Mackerras <paulus@samba.org> | 2007-04-12 13:50:03 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-04-12 13:50:03 -0400 |
commit | e049d1ca3094f3d1d94617f456a9961202f96e3a (patch) | |
tree | a30397ad22f2fbea268bd28fa69c60aad9dfa62a /include/asm-arm/system.h | |
parent | edfac96a92b88d3b0b53e3f8231b74beee9ecd1d (diff) | |
parent | 80584ff3b99c36ead7e130e453b3a48b18072d18 (diff) |
Merge branch 'linux-2.6' into for-2.6.22
Diffstat (limited to 'include/asm-arm/system.h')
-rw-r--r-- | include/asm-arm/system.h | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index f06d8a43fdee..69134c7518c1 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <asm/memory.h> | ||
6 | 7 | ||
7 | #define CPU_ARCH_UNKNOWN 0 | 8 | #define CPU_ARCH_UNKNOWN 0 |
8 | #define CPU_ARCH_ARMv3 1 | 9 | #define CPU_ARCH_ARMv3 1 |
@@ -154,7 +155,7 @@ extern unsigned int user_debug; | |||
154 | #define vectors_high() (0) | 155 | #define vectors_high() (0) |
155 | #endif | 156 | #endif |
156 | 157 | ||
157 | #if __LINUX_ARM_ARCH__ >= 6 | 158 | #if defined(CONFIG_CPU_XSC3) || __LINUX_ARM_ARCH__ >= 6 |
158 | #define isb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ | 159 | #define isb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ |
159 | : : "r" (0) : "memory") | 160 | : : "r" (0) : "memory") |
160 | #define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ | 161 | #define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ |
@@ -168,22 +169,23 @@ extern unsigned int user_debug; | |||
168 | #define dmb() __asm__ __volatile__ ("" : : : "memory") | 169 | #define dmb() __asm__ __volatile__ ("" : : : "memory") |
169 | #endif | 170 | #endif |
170 | 171 | ||
171 | #define mb() barrier() | 172 | #ifndef CONFIG_SMP |
172 | #define rmb() barrier() | 173 | #define mb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) |
173 | #define wmb() barrier() | 174 | #define rmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) |
174 | #define read_barrier_depends() do { } while(0) | 175 | #define wmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) |
175 | 176 | #define smp_mb() barrier() | |
176 | #ifdef CONFIG_SMP | 177 | #define smp_rmb() barrier() |
177 | #define smp_mb() dmb() | 178 | #define smp_wmb() barrier() |
178 | #define smp_rmb() dmb() | ||
179 | #define smp_wmb() dmb() | ||
180 | #define smp_read_barrier_depends() read_barrier_depends() | ||
181 | #else | 179 | #else |
182 | #define smp_mb() barrier() | 180 | #define mb() dmb() |
183 | #define smp_rmb() barrier() | 181 | #define rmb() dmb() |
184 | #define smp_wmb() barrier() | 182 | #define wmb() dmb() |
185 | #define smp_read_barrier_depends() read_barrier_depends() | 183 | #define smp_mb() dmb() |
186 | #endif /* CONFIG_SMP */ | 184 | #define smp_rmb() dmb() |
185 | #define smp_wmb() dmb() | ||
186 | #endif | ||
187 | #define read_barrier_depends() do { } while(0) | ||
188 | #define smp_read_barrier_depends() do { } while(0) | ||
187 | 189 | ||
188 | #define set_mb(var, value) do { var = value; smp_mb(); } while (0) | 190 | #define set_mb(var, value) do { var = value; smp_mb(); } while (0) |
189 | #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); | 191 | #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); |