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/b16dc52e64b2
branches: trunk
changeset: 339049:b16dc52e64b2
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 bc785774ecf4 -r b16dc52e64b2 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