aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-09-27 01:05:52 -0400
committerPaul Mundt <lethal@linux-sh.org>2006-09-27 01:05:52 -0400
commitfdfc74f9fcebdda14609159d5010b758a9409acf (patch)
tree191532cb703383768cc198a41503e412578921bb /include
parent36efc35447154317f9ffc5163a1793b5f7ff3de1 (diff)
sh: Support for SH-4A memory barriers.
SH-4A supports 'synco' as a barrier, sprinkle it around the cache ops as necessary.. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-sh/system.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h
index e89728d405d8..eb4902ed920a 100644
--- a/include/asm-sh/system.h
+++ b/include/asm-sh/system.h
@@ -84,10 +84,17 @@ static __inline__ unsigned long tas(volatile int *m)
84 84
85extern void __xchg_called_with_bad_pointer(void); 85extern void __xchg_called_with_bad_pointer(void);
86 86
87#ifdef CONFIG_CPU_SH4A
88#define mb() __asm__ __volatile__ ("synco": : :"memory")
89#define rmb() mb()
90#define wmb() __asm__ __volatile__ ("synco": : :"memory")
91#define read_barrier_depends() do { } while(0)
92#else
87#define mb() __asm__ __volatile__ ("": : :"memory") 93#define mb() __asm__ __volatile__ ("": : :"memory")
88#define rmb() mb() 94#define rmb() mb()
89#define wmb() __asm__ __volatile__ ("": : :"memory") 95#define wmb() __asm__ __volatile__ ("": : :"memory")
90#define read_barrier_depends() do { } while(0) 96#define read_barrier_depends() do { } while(0)
97#endif
91 98
92#ifdef CONFIG_SMP 99#ifdef CONFIG_SMP
93#define smp_mb() mb() 100#define smp_mb() mb()