Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/common/include/asm linux: Add mips definiti...



details:   https://anonhg.NetBSD.org/src/rev/e45a95a3bb21
branches:  trunk
changeset: 368563:e45a95a3bb21
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Jul 19 16:38:39 2022 +0000

description:
linux: Add mips definitions for mb, wmb, rmb.

diffstat:

 sys/external/bsd/common/include/asm/barrier.h |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r 7248c9fed879 -r e45a95a3bb21 sys/external/bsd/common/include/asm/barrier.h
--- a/sys/external/bsd/common/include/asm/barrier.h     Tue Jul 19 16:38:22 2022 +0000
+++ b/sys/external/bsd/common/include/asm/barrier.h     Tue Jul 19 16:38:39 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: barrier.h,v 1.16 2022/07/19 16:38:22 riastradh Exp $   */
+/*     $NetBSD: barrier.h,v 1.17 2022/07/19 16:38:39 riastradh Exp $   */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -77,6 +77,11 @@
 #endif
 #define        wmb()   mb()            /* XXX could maybe be __insn_barrier in TSO */
 #define        rmb()   mb()            /* XXX could maybe be __insn_barrier in TSO */
+#elif defined(__mips__)
+#include <mips/locore.h>
+#define        mb()    wbflush()
+#define        wmb()   mb()
+#define        rmb()   mb()
 #else
 #error Define machine-dependent memory-mapped I/O barriers for drm.
 #endif



Home | Main Index | Thread Index | Old Index