Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/common/lib/libc/arch/mips/atomic Always use sync if mips3 or...



details:   https://anonhg.NetBSD.org/src/rev/edab2f685d87
branches:  trunk
changeset: 809191:edab2f685d87
user:      matt <matt%NetBSD.org@localhost>
date:      Tue Jun 23 20:56:17 2015 +0000

description:
Always use sync if mips3 or later or not using O32 ABI.  (A little redundant
since not using O32 means you are using mips3 or later.)

diffstat:

 common/lib/libc/arch/mips/atomic/membar_ops.S |  26 ++++++--------------------
 1 files changed, 6 insertions(+), 20 deletions(-)

diffs (48 lines):

diff -r e6efbc135afb -r edab2f685d87 common/lib/libc/arch/mips/atomic/membar_ops.S
--- a/common/lib/libc/arch/mips/atomic/membar_ops.S     Tue Jun 23 20:54:43 2015 +0000
+++ b/common/lib/libc/arch/mips/atomic/membar_ops.S     Tue Jun 23 20:56:17 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: membar_ops.S,v 1.7 2015/06/22 06:06:02 matt Exp $      */
+/*     $NetBSD: membar_ops.S,v 1.8 2015/06/23 20:56:17 matt Exp $      */
 
 /*-
  * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc.
@@ -31,21 +31,11 @@
 
 #include "atomic_op_asm.h"
 
-#if defined(_KERNEL) && !defined(_RUMPKERNEL)
-
-#ifdef _KERNEL_OPT
-#include "opt_cputype.h"
-#include "opt_lockdebug.h"
-#include "opt_multiprocessor.h"
-#endif
-
-#include "assym.h"
-
-#if (MIPS_HAS_LLSC != 0 && defined(MULTIPROCESSOR)) || !defined(__mips_o32)
-#define        SYNC            sync
-#endif
-#elif !defined(__mips_o32)
-#define        SYNC            sync
+// If we are on building for MIPS III or later, put in SYNCs
+#if __mips >= 3 || !defined(__mips_o32)
+# define SYNC          sync
+#else
+# define SYNC          nop
 #endif
 
        .text
@@ -53,11 +43,7 @@
 
 LEAF(_membar_sync)
        j       ra
-#ifdef SYNC
         SYNC
-#else
-        nop
-#endif
 END(_membar_sync)
 
 #ifdef __OCTEON__



Home | Main Index | Thread Index | Old Index