diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 14:05:52 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 14:05:52 +0900 |
commit | fdfc74f9fcebdda14609159d5010b758a9409acf (patch) | |
tree | 191532cb703383768cc198a41503e412578921bb /include/asm-sh/system.h | |
parent | 36efc35447154317f9ffc5163a1793b5f7ff3de1 (diff) | |
download | kernel_goldelico_gta04-fdfc74f9fcebdda14609159d5010b758a9409acf.zip kernel_goldelico_gta04-fdfc74f9fcebdda14609159d5010b758a9409acf.tar.gz kernel_goldelico_gta04-fdfc74f9fcebdda14609159d5010b758a9409acf.tar.bz2 |
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/asm-sh/system.h')
-rw-r--r-- | include/asm-sh/system.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h index e89728d..eb4902e 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) extern void __xchg_called_with_bad_pointer(void); +#ifdef CONFIG_CPU_SH4A +#define mb() __asm__ __volatile__ ("synco": : :"memory") +#define rmb() mb() +#define wmb() __asm__ __volatile__ ("synco": : :"memory") +#define read_barrier_depends() do { } while(0) +#else #define mb() __asm__ __volatile__ ("": : :"memory") #define rmb() mb() #define wmb() __asm__ __volatile__ ("": : :"memory") #define read_barrier_depends() do { } while(0) +#endif #ifdef CONFIG_SMP #define smp_mb() mb() |