Module Name: src
Committed By: riastradh
Date: Mon Feb 20 13:30:47 UTC 2023
Modified Files:
src/sys/arch/mips/include: asm.h
Log Message:
mips/asm.h: Make membar macros conditional on MULTIPROCESSOR.
For !MULTIPROCESSOR, define them to be empty or nop as appropriate.
To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/mips/include/asm.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/mips/include/asm.h
diff -u src/sys/arch/mips/include/asm.h:1.72 src/sys/arch/mips/include/asm.h:1.73
--- src/sys/arch/mips/include/asm.h:1.72 Mon Feb 13 12:00:18 2023
+++ src/sys/arch/mips/include/asm.h Mon Feb 20 13:30:47 2023
@@ -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 @@ _C_LABEL(x):
#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 @@ _C_LABEL(x):
#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