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 mips/asm.h: Make membar macros conditi...



details:   https://anonhg.NetBSD.org/src/rev/bf8dd159629a
branches:  trunk
changeset: 373602:bf8dd159629a
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Feb 20 13:30:47 2023 +0000

description:
mips/asm.h: Make membar macros conditional on MULTIPROCESSOR.

For !MULTIPROCESSOR, define them to be empty or nop as appropriate.

diffstat:

 sys/arch/mips/include/asm.h |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r fc359af31639 -r bf8dd159629a sys/arch/mips/include/asm.h
--- a/sys/arch/mips/include/asm.h       Mon Feb 20 13:30:36 2023 +0000
+++ b/sys/arch/mips/include/asm.h       Mon Feb 20 13:30:47 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asm.h,v 1.72 2023/02/13 12:00:18 riastradh Exp $       */
+/*     $NetBSD: asm.h,v 1.73 2023/02/20 13:30:47 riastradh Exp $       */
 
 /*
  * Copyright (c) 1992, 1993
@@ -59,6 +59,7 @@
 
 #if defined(_KERNEL_OPT)
 #include "opt_gprof.h"
+#include "opt_multiprocessor.h"
 #endif
 
 #ifdef __ASSEMBLER__
@@ -573,7 +574,7 @@
 #endif
 
 /* compiler define */
-#if defined(__OCTEON__)
+#if defined(MULTIPROCESSOR) && defined(__OCTEON__)
 /*
  * See common/lib/libc/arch/mips/atomic/membar_ops.S for notes on
  * Octeon memory ordering guarantees and barriers.
@@ -614,7 +615,7 @@
 #define        SYNC_REL        sync 4
 #define        BDSYNC_PLUNGER  sync 4
 #define        SYNC_PLUNGER    sync 4
-#elif __mips >= 3 || !defined(__mips_o32)
+#elif defined(MULTIPROCESSOR) && (__mips >= 3 || !defined(__mips_o32))
 #define        LLSCSYNC        /* nothing */
 #define        BDSYNC          sync
 #define        BDSYNC_ACQ      sync



Home | Main Index | Thread Index | Old Index