summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/include
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2022-07-20 15:45:28 +0000
committerthorpej <thorpej@NetBSD.org>2022-07-20 15:45:28 +0000
commit2e33f394a09bfe78f10cfe34d094e0f16caac39d (patch)
treee46dbbfc9bb9b81fa056857feb5dfaa7838f6bd9 /sys/arch/alpha/include
parentac0732ab34e76569641fed1be40af249389835d0 (diff)
In the Alpha tc_syncbus(), we need to issue a MB because WMB does not
order reads with respect to writes. Remove now-redundant tc_wmb() calls before tc_syncbus(). NFC on MIPS other than removing a redundant wbflush() (tc_wmb() followed by tc_syncbus()).
Diffstat (limited to 'sys/arch/alpha/include')
-rw-r--r--sys/arch/alpha/include/tc_machdep.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/alpha/include/tc_machdep.h b/sys/arch/alpha/include/tc_machdep.h
index c0d91cceb77..6b762a99389 100644
--- a/sys/arch/alpha/include/tc_machdep.h
+++ b/sys/arch/alpha/include/tc_machdep.h
@@ -1,4 +1,4 @@
-/* $NetBSD: tc_machdep.h,v 1.7 2017/06/22 16:46:52 flxd Exp $ */
+/* $NetBSD: tc_machdep.h,v 1.8 2022/07/20 15:45:28 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -71,6 +71,11 @@ typedef int32_t tc_offset_t;
#define tc_syncbus() \
do { \
volatile uint32_t no_optimize; \
+ /* \
+ * WMB does not order reads with respect to writes, so a \
+ * MB is required here. \
+ */ \
+ alpha_mb(); \
no_optimize = \
*(volatile uint32_t *)ALPHA_PHYS_TO_K0SEG(0x00000001f0080220); \
__USE(no_optimize); \