summaryrefslogtreecommitdiffstats
path: root/sys/dev/gem/if_gemvar.h
diff options
context:
space:
mode:
authortmm <tmm@FreeBSD.org>2003-01-21 17:17:01 +0000
committertmm <tmm@FreeBSD.org>2003-01-21 17:17:01 +0000
commit2fe5a13b8fa5331d001f3121a47f56057423648f (patch)
tree42fdfd1bc727d9599c5b3768782edb5fae2f1458 /sys/dev/gem/if_gemvar.h
parentc33c23494393704bee7cde042d1876c8b847dbba (diff)
downloadFreeBSD-src-2fe5a13b8fa5331d001f3121a47f56057423648f.zip
FreeBSD-src-2fe5a13b8fa5331d001f3121a47f56057423648f.tar.gz
bus_dmamap_sync() overhaul:
- Remove NetBSD-style or-ed together BUS_DMASYNC operations, in some cases relaxing the (intended) syncing operation a bit. - Stop pretending that that we can sync part of a dmamap: replace the GEM_CDTXSYNC and GEM_CDRXSYNC macros with GEM_CDSYNC to sync the complete control map, and combine syncs wherever possible to avoid the overhead. - Sync all maps before unloading them. - Remove a few syncs which should be unnecessary.
Diffstat (limited to 'sys/dev/gem/if_gemvar.h')
-rw-r--r--sys/dev/gem/if_gemvar.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/dev/gem/if_gemvar.h b/sys/dev/gem/if_gemvar.h
index 62e0b18..4bf9bb0 100644
--- a/sys/dev/gem/if_gemvar.h
+++ b/sys/dev/gem/if_gemvar.h
@@ -193,12 +193,9 @@ struct gem_softc {
#define GEM_CDTXADDR(sc, x) ((sc)->sc_cddma + GEM_CDTXOFF((x)))
#define GEM_CDRXADDR(sc, x) ((sc)->sc_cddma + GEM_CDRXOFF((x)))
-#define GEM_CDTXSYNC(sc, x, n, ops) \
+#define GEM_CDSYNC(sc, ops) \
bus_dmamap_sync((sc)->sc_cdmatag, (sc)->sc_cddmamap, (ops)); \
-#define GEM_CDRXSYNC(sc, x, ops) \
- bus_dmamap_sync((sc)->sc_cdmatag, (sc)->sc_cddmamap, (ops))
-
#define GEM_INIT_RXDESC(sc, x) \
do { \
struct gem_rxsoft *__rxs = &sc->sc_rxsoft[(x)]; \
@@ -212,7 +209,6 @@ do { \
GEM_DMA_WRITE((sc), \
(((__m->m_ext.ext_size)<<GEM_RD_BUFSHIFT) \
& GEM_RD_BUFSIZE) | GEM_RD_OWN); \
- GEM_CDRXSYNC((sc), (x), BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); \
} while (0)
#ifdef _KERNEL
OpenPOWER on IntegriCloud