diff options
author | David Howells <dhowells@redhat.com> | 2008-04-10 11:11:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-10 16:41:29 -0400 |
commit | f17520e1f19172057328e50ffed01a42534921e9 (patch) | |
tree | 34d23d8bfff4511687b91c93d9bb09b4fa9d931f /include/asm-frv | |
parent | ed9b949f55bc8a6bb6083ce0eddb53d06aee302a (diff) |
FRV: Don't make smp_{r, w, }mb() interpolate MEMBAR when CONFIG_SMP=n [try #2]
Don't make smp_{r,w,}mb() interpolate a MEMBAR instruction when CONFIG_SMP=n as
SMP memory barries on UP systems should interpolate a compiler barrier only.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-frv')
-rw-r--r-- | include/asm-frv/system.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/include/asm-frv/system.h b/include/asm-frv/system.h index 2c57f4734746..30a67a9da11a 100644 --- a/include/asm-frv/system.h +++ b/include/asm-frv/system.h | |||
@@ -179,14 +179,23 @@ do { \ | |||
179 | #define mb() asm volatile ("membar" : : :"memory") | 179 | #define mb() asm volatile ("membar" : : :"memory") |
180 | #define rmb() asm volatile ("membar" : : :"memory") | 180 | #define rmb() asm volatile ("membar" : : :"memory") |
181 | #define wmb() asm volatile ("membar" : : :"memory") | 181 | #define wmb() asm volatile ("membar" : : :"memory") |
182 | #define set_mb(var, value) do { var = value; mb(); } while (0) | 182 | #define read_barrier_depends() barrier() |
183 | 183 | ||
184 | #define smp_mb() mb() | 184 | #ifdef CONFIG_SMP |
185 | #define smp_rmb() rmb() | 185 | #define smp_mb() mb() |
186 | #define smp_wmb() wmb() | 186 | #define smp_rmb() rmb() |
187 | 187 | #define smp_wmb() wmb() | |
188 | #define read_barrier_depends() do {} while(0) | ||
189 | #define smp_read_barrier_depends() read_barrier_depends() | 188 | #define smp_read_barrier_depends() read_barrier_depends() |
189 | #define set_mb(var, value) \ | ||
190 | do { xchg(&var, (value)); } while (0) | ||
191 | #else | ||
192 | #define smp_mb() barrier() | ||
193 | #define smp_rmb() barrier() | ||
194 | #define smp_wmb() barrier() | ||
195 | #define smp_read_barrier_depends() do {} while(0) | ||
196 | #define set_mb(var, value) \ | ||
197 | do { var = (value); barrier(); } while (0) | ||
198 | #endif | ||
190 | 199 | ||
191 | #define HARD_RESET_NOW() \ | 200 | #define HARD_RESET_NOW() \ |
192 | do { \ | 201 | do { \ |