summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-02-27 05:17:54 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-02-27 05:17:54 +0000
commit2bfe70d4f3adbeab269c9655d2272d6bd458eb03 (patch)
treee48b7f4cea8810ac23c42fa8ac424de766195bd7 /sys/arch
parent6beb1879e075daafedf86bade47367ed34c0c4d6 (diff)
Be a bin more paranoid in m88410_inval() in the operation complete check.
ok deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mvme88k/mvme88k/m88410.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/arch/mvme88k/mvme88k/m88410.c b/sys/arch/mvme88k/mvme88k/m88410.c
index 6501b77d094..1b5217a0b8f 100644
--- a/sys/arch/mvme88k/mvme88k/m88410.c
+++ b/sys/arch/mvme88k/mvme88k/m88410.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: m88410.c,v 1.3 2007/12/02 21:25:01 miod Exp $ */
+/* $OpenBSD: m88410.c,v 1.4 2009/02/27 05:17:53 miod Exp $ */
/*
* Copyright (c) 2001 Steve Murphree, Jr.
* All rights reserved.
@@ -49,7 +49,7 @@
/*
* Flush physical page number (specified in the low 20 bits of the
- * address.
+ * address).
*/
#define XCC_FLUSH_PAGE 0x01
/*
@@ -164,6 +164,10 @@ mc88410_inval(void)
*/
dummy = *(volatile u_int32_t *)(BS_BASE + BS_XCCR);
+ /* just in case it didn't, spin until the operation is complete */
+ while ((*(volatile u_int32_t *)(BS_BASE + BS_XCCR) & BS_XCC_FBSY) != 0)
+ ;
+
*(volatile u_int16_t *)(BS_BASE + BS_GCSR) = bs_gcsr;
*(volatile u_int16_t *)(BS_BASE + BS_ROMCR) = bs_romcr;
}