From 012bb3e61e5eced6c610f9e036372bf0c8def2d1 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 5 Oct 2000 01:18:40 +0000 Subject: 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. --- include/asm-mips64/system.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'include/asm-mips64/system.h') 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) -- cgit v1.2.3