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-07 14:57:36 +0000
commit405da69a20e53c8febf8e11ffa500a6ccc6353cc (patch)
treef95bb1ea2655d4a1684b628ba7217e5ca3c0f389
parent1d6a4d4c3f8312b2cb738868578d38131078cc70 (diff)
downloadlinux-sh-405da69a20e53c8febf8e11ffa500a6ccc6353cc.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