diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-04-30 06:27:18 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-04-30 06:27:18 +0000 |
commit | c7937482982c2c678a0eb9952ee112deb71d1021 (patch) | |
tree | 0a7bd28b15d5e916bfb7b7edfe915746c0478364 | |
parent | 933ab1db5f0184f90012172807b4858652cc7aa3 (diff) |
iommu flushing workaround is only needed on MS2 machines, apparently
-rw-r--r-- | sys/arch/sparc/sparc/iommureg.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/arch/sparc/sparc/iommureg.h b/sys/arch/sparc/sparc/iommureg.h index 8d49bf68b3f..5ef5b65184d 100644 --- a/sys/arch/sparc/sparc/iommureg.h +++ b/sys/arch/sparc/sparc/iommureg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: iommureg.h,v 1.4 1998/02/11 01:27:29 marc Exp $ */ +/* $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 $ */ /* @@ -61,18 +61,20 @@ struct iommureg { #define IOMMU_FLUSH_MASK 0xfffff000 /* - * 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 some machines (SS4s & SS5s) where our caller + * 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 * would see some of its local (`%lx') registers trashed. */ #define IOMMU_FLUSHPAGE(sc, va) do { \ (sc)->sc_reg->io_flushpage = (va) & IOMMU_FLUSH_MASK; \ - (*(volatile u_int32_t *)&(sc)->sc_reg->io_bar); \ + if (cpuinfo.cpu_type == CPUTYP_MS2) \ + (*(volatile u_int32_t *)&(sc)->sc_reg->io_bar); \ } while (0); #define IOMMU_FLUSHALL(sc) do { \ (sc)->sc_reg->io_flashclear = 0; \ - (*(volatile u_int32_t *)&(sc)->sc_reg->io_bar); \ + if (cpuinfo.cpu_type == CPUTYP_MS2) \ + (*(volatile u_int32_t *)&(sc)->sc_reg->io_bar); \ } while (0) /* to pte.h ? */ |