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: Define mb/wmb/rmb...
details: https://anonhg.NetBSD.org/src/rev/fa4189ed5343
branches: trunk
changeset: 1029199:fa4189ed5343
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Dec 27 10:41:57 2021 +0000
description:
linux: Define mb/wmb/rmb as mfence/sfence/lfence on i386 too.
Not the same as membar_*; drm uses mb to order special instructions
like clflush which require mfence for ordering.
diffstat:
sys/external/bsd/common/include/asm/barrier.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r 88084b89305d -r fa4189ed5343 sys/external/bsd/common/include/asm/barrier.h
--- a/sys/external/bsd/common/include/asm/barrier.h Sun Dec 26 21:33:48 2021 +0000
+++ b/sys/external/bsd/common/include/asm/barrier.h Mon Dec 27 10:41:57 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: barrier.h,v 1.11 2021/12/19 12:25:20 riastradh Exp $ */
+/* $NetBSD: barrier.h,v 1.12 2021/12/27 10:41:57 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
#define mb() __asm __volatile ("dsb sy" ::: "memory")
#define wmb() __asm __volatile ("dsb st" ::: "memory")
#define rmb() __asm __volatile ("dsb ld" ::: "memory")
-#elif defined(__x86_64__)
+#elif defined(__i386__) || defined(__x86_64__)
#include <x86/cpufunc.h>
#define mb() x86_mfence()
#define wmb() x86_sfence()
Home |
Main Index |
Thread Index |
Old Index