Apply by doing cd /sys/arch/sparc/sparc patch -p0 < iommureg.patch Index: iommureg.h =================================================================== RCS file: /cvs/src/sys/arch/sparc/sparc/iommureg.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- iommureg.h 1998/02/11 01:27:29 1.4 +++ iommureg.h 1998/04/30 06:27:17 1.5 @@ -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 @@ #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 ? */