summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/include/bus_private.h
diff options
context:
space:
mode:
authortmm <tmm@FreeBSD.org>2003-01-06 21:59:54 +0000
committertmm <tmm@FreeBSD.org>2003-01-06 21:59:54 +0000
commit64ef30fddd206a400119c7364e525bdcd940a3de (patch)
tree62a440f3b650bf019a90f1a972512d13433ad63a /sys/sparc64/include/bus_private.h
parenteabf06862c56aaa33ce08be99f7aefa90a80fd4b (diff)
downloadFreeBSD-src-64ef30fddd206a400119c7364e525bdcd940a3de.zip
FreeBSD-src-64ef30fddd206a400119c7364e525bdcd940a3de.tar.gz
Change the iommu code to be able to handle more than one DVMA area per
map. Use this new feature to implement iommu_dvmamap_load_mbuf() and iommu_dvmamap_load_uio() functions in terms of a new helper function, iommu_dvmamap_load_buffer(). Reimplement the iommu_dvmamap_load() to use it, too. This requires some changes to the map format; in addition to that, remove unused or redundant members. Add SBus and Psycho wrappers for the new functions, and make them available through the respective DMA tags.
Diffstat (limited to 'sys/sparc64/include/bus_private.h')
-rw-r--r--sys/sparc64/include/bus_private.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/sys/sparc64/include/bus_private.h b/sys/sparc64/include/bus_private.h
index 715122c..4b68ffd 100644
--- a/sys/sparc64/include/bus_private.h
+++ b/sys/sparc64/include/bus_private.h
@@ -35,15 +35,23 @@
#define BUS_DMAMAP_NSEGS ((BUS_SPACE_MAXSIZE / PAGE_SIZE) + 1)
+struct bus_dmamap_res {
+ struct resource *dr_res;
+ bus_size_t dr_used;
+ SLIST_ENTRY(bus_dmamap_res) dr_link;
+};
+
struct bus_dmamap {
- bus_dma_tag_t dmat;
- void *buf; /* unmapped buffer pointer */
- bus_size_t buflen; /* unmapped buffer length */
- bus_addr_t start; /* start of mapped region */
- struct resource *res; /* associated resource */
- bus_size_t dvmaresv; /* reseved DVMA memory */
- STAILQ_ENTRY(bus_dmamap) maplruq;
- int onq;
+ TAILQ_ENTRY(bus_dmamap) dm_maplruq;
+ SLIST_HEAD(, bus_dmamap_res) dm_reslist;
+ int dm_onq;
+ int dm_loaded;
};
+static __inline void
+sparc64_dmamap_init(struct bus_dmamap *m)
+{
+ SLIST_INIT(&m->dm_reslist);
+}
+
#endif /* !_MACHINE_BUS_PRIVATE_H_ */
OpenPOWER on IntegriCloud