summaryrefslogtreecommitdiffstats
path: root/include/asm-mips64/system.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-mips64/system.h')
-rw-r--r--include/asm-mips64/system.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/include/asm-mips64/system.h b/include/asm-mips64/system.h
index 4b9d9f551..ca81b8bf5 100644
--- a/include/asm-mips64/system.h
+++ b/include/asm-mips64/system.h
@@ -65,9 +65,7 @@ __asm__ __volatile__( \
".set\tnoreorder\n\t" \
"mfc0\t%0,$12\n\t" \
".set\treorder" \
- : "=r" (x) \
- : /* no inputs */ \
- : "memory")
+ : "=r" (x))
#define __save_and_cli(x) \
__asm__ __volatile__( \
@@ -142,8 +140,7 @@ extern void __global_restore_flags(unsigned long);
__asm__ __volatile__( \
"# prevent instructions being moved around\n\t" \
".set\tnoreorder\n\t" \
- "# 8 nops to fool the R4400 pipeline\n\t" \
- "nop;nop;nop;nop;nop;nop;nop;nop\n\t" \
+ "sync\n\t" \
".set\treorder" \
: /* no output */ \
: /* no input */ \
@@ -151,6 +148,16 @@ __asm__ __volatile__( \
#define rmb() mb()
#define wmb() mb()
+#ifdef CONFIG_SMP
+#define smp_mb() mb()
+#define smp_rmb() rmb()
+#define smp_wmb() wmb()
+#else
+#define smp_mb() barrier()
+#define smp_rmb() barrier()
+#define smp_wmb() barrier()
+#endif
+
#define set_mb(var, value) \
do { var = value; mb(); } while (0)