summaryrefslogtreecommitdiffstats
path: root/include/asm-mips64/system.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
commit012bb3e61e5eced6c610f9e036372bf0c8def2d1 (patch)
tree87efc733f9b164e8c85c0336f92c8fb7eff6d183 /include/asm-mips64/system.h
parent625a1589d3d6464b5d90b8a0918789e3afffd220 (diff)
Merge with Linux 2.4.0-test9. Please check DECstation, I had a number
of rejects to fixup while integrating Linus patches. I also found that this kernel will only boot SMP on Origin; the UP kernel freeze soon after bootup with SCSI timeout messages. I commit this anyway since I found that the last CVS versions had the same problem.
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)