Module Name: src
Committed By: skrll
Date: Sun Aug 9 08:13:09 UTC 2020
Modified Files:
src/sys/arch/mips/include: asm.h
Log Message:
Use compiler defines to determine which LLSCSYNC, et al
to provide.
This should fix mips builds.
To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 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.58 src/sys/arch/mips/include/asm.h:1.59
--- src/sys/arch/mips/include/asm.h:1.58 Thu Aug 6 10:00:20 2020
+++ src/sys/arch/mips/include/asm.h Sun Aug 9 08:13:09 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.58 2020/08/06 10:00:20 skrll Exp $ */
+/* $NetBSD: asm.h,v 1.59 2020/08/09 08:13:09 skrll Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -54,10 +54,6 @@
#ifndef _MIPS_ASM_H
#define _MIPS_ASM_H
-#include "opt_cputype.h"
-#include "opt_lockdebug.h"
-#include "opt_multiprocessor.h"
-
#include <sys/cdefs.h> /* for API selection */
#include <mips/regdef.h>
@@ -517,23 +513,17 @@ _C_LABEL(x):
#define NOP_L /* nothing */
#endif
-#if defined(MULTIPROCESSOR)
-#if defined(MIPS64_OCTEON)
+/* compiler define */
+#if defined(__OCTEON__)
/* early cnMIPS have erratum which means 2 */
#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
-#define LLSCSYNC /* nothing (something?) */
+#define LLSCSYNC sync
#define SYNC sync
#define BDSYNC sync
#endif
-#else
-#define LLSCSYNC /* nothing */
-#define SYNC /* nothing */
-#define BDSYNC nop
-#endif /* defined(MULTIPROCESSOR) */
-
/* CPU dependent hook for cp0 load delays */
#if defined(MIPS1) || defined(MIPS2) || defined(MIPS3)