/*
- * 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)