Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips/include More SYNC centralisation



details:   https://anonhg.NetBSD.org/src/rev/05b6c9e21cb9
branches:  trunk
changeset: 974772:05b6c9e21cb9
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon Aug 10 14:37:38 2020 +0000

description:
More SYNC centralisation

diffstat:

 common/lib/libc/arch/mips/atomic/membar_ops.S |  11 ++---------
 sys/arch/mips/include/asm.h                   |   8 ++++++--
 2 files changed, 8 insertions(+), 11 deletions(-)

diffs (55 lines):

diff -r 64c841acc384 -r 05b6c9e21cb9 common/lib/libc/arch/mips/atomic/membar_ops.S
--- a/common/lib/libc/arch/mips/atomic/membar_ops.S     Mon Aug 10 11:09:15 2020 +0000
+++ b/common/lib/libc/arch/mips/atomic/membar_ops.S     Mon Aug 10 14:37:38 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: membar_ops.S,v 1.9 2020/08/01 09:26:49 skrll Exp $     */
+/*     $NetBSD: membar_ops.S,v 1.10 2020/08/10 14:37:38 skrll Exp $    */
 
 /*-
  * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc.
@@ -31,19 +31,12 @@
 
 #include "atomic_op_asm.h"
 
-// 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
        .set noreorder
 
 LEAF(_membar_sync)
        j       ra
-        SYNC
+        BDSYNC
 END(_membar_sync)
 
 #ifdef __OCTEON__
diff -r 64c841acc384 -r 05b6c9e21cb9 sys/arch/mips/include/asm.h
--- a/sys/arch/mips/include/asm.h       Mon Aug 10 11:09:15 2020 +0000
+++ b/sys/arch/mips/include/asm.h       Mon Aug 10 14:37:38 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.59 2020/08/09 08:13:09 skrll Exp $   */
+/*     $NetBSD: asm.h,v 1.60 2020/08/10 14:37:38 skrll Exp $   */
 
 /*
  * Copyright (c) 1992, 1993
@@ -519,10 +519,14 @@
 #define        LLSCSYNC        sync 4; sync 4
 #define        SYNC            sync 4          /* sync 4 == syncw - sync all writes */
 #define        BDSYNC          sync 4          /* sync 4 == syncw - sync all writes */
-#else
+#elif __mips >= 3 || !defined(__mips_o32)
 #define        LLSCSYNC        sync
 #define        SYNC            sync
 #define        BDSYNC          sync
+#else
+#define        LLSCSYNC        /* nothing */
+#define        SYNC            /* nothing */
+#define        BDSYNC          nop
 #endif
 
 /* CPU dependent hook for cp0 load delays */



Home | Main Index | Thread Index | Old Index