summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1998-05-10 21:11:54 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1998-05-10 21:11:54 +0000
commit0168d914ca3c0acac2abd10c35b265d733e3fad3 (patch)
treefe582cfd6e22f4151aafcd0b13301eb8ad702e34 /sys/arch
parent5fc91fbe4ca56874287a24e218a60cfd9aacbe7c (diff)
Nicer fix to the problems on different sun4m machines.
from NetBSD-current 980505
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc/sparc/iommureg.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/arch/sparc/sparc/iommureg.h b/sys/arch/sparc/sparc/iommureg.h
index 5ef5b65184d..ac364550922 100644
--- a/sys/arch/sparc/sparc/iommureg.h
+++ b/sys/arch/sparc/sparc/iommureg.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: iommureg.h,v 1.5 1998/04/30 06:27:17 deraadt Exp $ */
-/* $NetBSD: iommureg.h,v 1.3 1997/09/14 19:16:04 pk Exp $ */
+/* $OpenBSD: iommureg.h,v 1.6 1998/05/10 21:11:53 art Exp $ */
+/* $NetBSD: iommureg.h,v 1.5 1998/05/04 23:16:59 pk Exp $ */
/*
* Copyright (c) 1996
@@ -61,20 +61,17 @@ struct iommureg {
#define IOMMU_FLUSH_MASK 0xfffff000
/*
- * On SS4/SS5 machines, read something back from the IOMMU control
- * space after writing to a flush register to drain write buffers (?).
- * This seems to avoid utter lossage on these machines where our caller
+ * A few empty cycles after touching the IOMMU registers seems to
+ * avoid utter lossage on some machines (SS4s & SS5s) where our caller
* would see some of its local (`%lx') registers trashed.
*/
#define IOMMU_FLUSHPAGE(sc, va) do { \
(sc)->sc_reg->io_flushpage = (va) & IOMMU_FLUSH_MASK; \
- if (cpuinfo.cpu_type == CPUTYP_MS2) \
- (*(volatile u_int32_t *)&(sc)->sc_reg->io_bar); \
+ __asm("nop;nop;nop;"); \
} while (0);
#define IOMMU_FLUSHALL(sc) do { \
(sc)->sc_reg->io_flashclear = 0; \
- if (cpuinfo.cpu_type == CPUTYP_MS2) \
- (*(volatile u_int32_t *)&(sc)->sc_reg->io_bar); \
+ __asm("nop;nop;nop;"); \
} while (0)
/* to pte.h ? */