summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@libc.org>2016-04-07 14:51:07 +0000
committerRich Felker <dalias@libc.org>2016-04-11 22:57:08 +0000
commit22ab4377089de5b5c026ca3a5ee1db4b00877f31 (patch)
tree6d4cfe737db15de88c13a0a27a5a00f7a1988370
parent3f862b6e88e638d89e7d1eb6a51060892ee743a9 (diff)
downloadlinux-sh-22ab4377089de5b5c026ca3a5ee1db4b00877f31.tar.gz
sh: on J-Core, only use cas.l barrier for smp barrier, not mb()
Should be merged to original commit in rebase.
-rw-r--r--arch/sh/include/asm/barrier.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/sh/include/asm/barrier.h b/arch/sh/include/asm/barrier.h
index 8f3e9c0415f6..3c30b6e166b6 100644
--- a/arch/sh/include/asm/barrier.h
+++ b/arch/sh/include/asm/barrier.h
@@ -30,7 +30,9 @@
#define ctrl_barrier() __icbi(PAGE_OFFSET)
#else
#if defined(CONFIG_CPU_J2) && defined(CONFIG_SMP)
-#define mb() do { int tmp = 0; __asm__ __volatile__ ("cas.l %0,%0,@%1" : "+r"(tmp) : "z"(&tmp) : "memory", "t"); } while(0)
+#define __smp_mb() do { int tmp = 0; __asm__ __volatile__ ("cas.l %0,%0,@%1" : "+r"(tmp) : "z"(&tmp) : "memory", "t"); } while(0)
+#define __smp_rmb() __smp_mb()
+#define __smp_wmb() __smp_mb()
#endif
#define ctrl_barrier() __asm__ __volatile__ ("nop;nop;nop;nop;nop;nop;nop;nop")
#endif