summaryrefslogtreecommitdiff
path: root/arch/arch-sh.h
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-12-22 09:06:43 +0100
committerJens Axboe <jens.axboe@oracle.com>2009-12-22 09:06:43 +0100
commite0c4a4691b78163e8dfca9221147b2b076819cf3 (patch)
tree995e3651192e9d078f74eb1a51dbe6246633f6c9 /arch/arch-sh.h
parentc4d8710f7cd2d449f452082786c9e59186aa388b (diff)
downloadfio-e0c4a4691b78163e8dfca9221147b2b076819cf3.tar.gz
Fix barrier for sh4a
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'arch/arch-sh.h')
-rw-r--r--arch/arch-sh.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/arch-sh.h b/arch/arch-sh.h
index 23e6ca07..08c5fb3d 100644
--- a/arch/arch-sh.h
+++ b/arch/arch-sh.h
@@ -21,7 +21,14 @@
#endif
#define nop __asm__ __volatile__ ("nop": : :"memory")
-#define read_barrier() __asm__ __volatile__ (" " : : : "memory")
-#define write_barrier() __asm__ __volatile__ (" " : : : "memory")
+
+#if defined(__SH4A__)
+#define mb() __asm__ __volatile__ ("synco": : :"memory")
+#else
+#define mb() __asm__ __volatile__ (" " : : : "memory")
+#endif
+
+#define read_barrier() mb()
+#define write_barrier() mb()
#endif