Module Name: src
Committed By: matt
Date: Tue Jun 23 20:56:17 UTC 2015
Modified Files:
src/common/lib/libc/arch/mips/atomic: membar_ops.S
Log Message:
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.)
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/common/lib/libc/arch/mips/atomic/membar_ops.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/common/lib/libc/arch/mips/atomic/membar_ops.S
diff -u src/common/lib/libc/arch/mips/atomic/membar_ops.S:1.7 src/common/lib/libc/arch/mips/atomic/membar_ops.S:1.8
--- src/common/lib/libc/arch/mips/atomic/membar_ops.S:1.7 Mon Jun 22 06:06:02 2015
+++ src/common/lib/libc/arch/mips/atomic/membar_ops.S Tue Jun 23 20:56:17 2015
@@ -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__