Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/xen/include xen: Fix sense of xen_rmb/wmb to make s...
details: https://anonhg.NetBSD.org/src/rev/c892267a6d86
branches: trunk
changeset: 373710:c892267a6d86
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Feb 25 00:32:26 2023 +0000
description:
xen: Fix sense of xen_rmb/wmb to make sense.
Use membar_acquire and membar_release, not membar_consumer and
membar_producer, out of paranoia -- that better matches Linux's
rmb/wmb (at least for non-I/O loads and stores).
Proposed on port-xen:
https://mail-index.netbsd.org/port-xen/2022/07/13/msg010248.html
diffstat:
sys/arch/xen/include/hypervisor.h | 6 +++---
sys/arch/xen/include/xenring.h | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diffs (40 lines):
diff -r ff17715d5fba -r c892267a6d86 sys/arch/xen/include/hypervisor.h
--- a/sys/arch/xen/include/hypervisor.h Sat Feb 25 00:32:13 2023 +0000
+++ b/sys/arch/xen/include/hypervisor.h Sat Feb 25 00:32:26 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hypervisor.h,v 1.55 2022/09/07 00:40:19 knakahara Exp $ */
+/* $NetBSD: hypervisor.h,v 1.56 2023/02/25 00:32:26 riastradh Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -111,8 +111,8 @@
#undef xen_wmb
#define xen_mb() membar_sync()
-#define xen_rmb() membar_producer()
-#define xen_wmb() membar_consumer()
+#define xen_rmb() membar_acquire()
+#define xen_wmb() membar_release()
#endif /* __XEN_INTERFACE_VERSION */
#include <machine/xen/hypercalls.h>
diff -r ff17715d5fba -r c892267a6d86 sys/arch/xen/include/xenring.h
--- a/sys/arch/xen/include/xenring.h Sat Feb 25 00:32:13 2023 +0000
+++ b/sys/arch/xen/include/xenring.h Sat Feb 25 00:32:26 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xenring.h,v 1.6 2020/04/25 15:26:17 bouyer Exp $ */
+/* $NetBSD: xenring.h,v 1.7 2023/02/25 00:32:26 riastradh Exp $ */
/*
* Glue goop for xbd ring request/response protocol structures.
@@ -25,8 +25,8 @@
#undef xen_wmb
#define xen_mb() membar_sync()
-#define xen_rmb() membar_producer()
-#define xen_wmb() membar_consumer()
+#define xen_rmb() membar_acquire()
+#define xen_wmb() membar_release()
/*
* Define ring types. These were previously part of the public API.
Home |
Main Index |
Thread Index |
Old Index