Lines Matching refs:tag

299 	res = (bus_dma_tag_t)ctx->tag;  in iommu_get_dma_tag()
408 if (dmat == dmat->ctx->tag) in iommu_bus_dma_tag_destroy()
428 struct bus_dma_tag_iommu *tag; in iommu_bus_dmamap_create() local
431 tag = (struct bus_dma_tag_iommu *)dmat; in iommu_bus_dmamap_create()
433 DOMAINSET_PREF(tag->common.domain), M_NOWAIT | M_ZERO); in iommu_bus_dmamap_create()
438 if (tag->segments == NULL) { in iommu_bus_dmamap_create()
439 tag->segments = malloc_domainset(sizeof(bus_dma_segment_t) * in iommu_bus_dmamap_create()
440 tag->common.nsegments, M_IOMMU_DMAMAP, in iommu_bus_dmamap_create()
441 DOMAINSET_PREF(tag->common.domain), M_NOWAIT); in iommu_bus_dmamap_create()
442 if (tag->segments == NULL) { in iommu_bus_dmamap_create()
450 map->tag = tag; in iommu_bus_dmamap_create()
453 tag->map_count++; in iommu_bus_dmamap_create()
462 struct bus_dma_tag_iommu *tag; in iommu_bus_dmamap_destroy() local
465 tag = (struct bus_dma_tag_iommu *)dmat; in iommu_bus_dmamap_destroy()
476 tag->map_count--; in iommu_bus_dmamap_destroy()
485 struct bus_dma_tag_iommu *tag; in iommu_bus_dmamem_alloc() local
499 tag = (struct bus_dma_tag_iommu *)dmat; in iommu_bus_dmamem_alloc()
502 if (tag->common.maxsize < PAGE_SIZE && in iommu_bus_dmamem_alloc()
503 tag->common.alignment <= tag->common.maxsize && in iommu_bus_dmamem_alloc()
505 *vaddr = malloc_domainset(tag->common.maxsize, M_DEVBUF, in iommu_bus_dmamem_alloc()
506 DOMAINSET_PREF(tag->common.domain), mflags); in iommu_bus_dmamem_alloc()
510 DOMAINSET_PREF(tag->common.domain), tag->common.maxsize, in iommu_bus_dmamem_alloc()
525 struct bus_dma_tag_iommu *tag; in iommu_bus_dmamem_free() local
528 tag = (struct bus_dma_tag_iommu *)dmat; in iommu_bus_dmamem_free()
537 kmem_free(vaddr, tag->common.maxsize); in iommu_bus_dmamem_free()
545 iommu_bus_dmamap_load_something1(struct bus_dma_tag_iommu *tag, in iommu_bus_dmamap_load_something1() argument
558 segs = tag->segments; in iommu_bus_dmamap_load_something1()
559 ctx = tag->ctx; in iommu_bus_dmamap_load_something1()
568 if (seg >= tag->common.nsegments) { in iommu_bus_dmamap_load_something1()
572 buflen1 = buflen > tag->common.maxsegsz ? in iommu_bus_dmamap_load_something1()
573 tag->common.maxsegsz : buflen; in iommu_bus_dmamap_load_something1()
580 if (seg + 1 < tag->common.nsegments) in iommu_bus_dmamap_load_something1()
583 error = iommu_gas_map(domain, &tag->common, buflen1, in iommu_bus_dmamap_load_something1()
592 tag->common.alignment), in iommu_bus_dmamap_load_something1()
595 (uintmax_t)tag->common.alignment)); in iommu_bus_dmamap_load_something1()
596 KASSERT(entry->end <= tag->common.lowaddr || in iommu_bus_dmamap_load_something1()
597 entry->start >= tag->common.highaddr, in iommu_bus_dmamap_load_something1()
601 (uintmax_t)tag->common.lowaddr, in iommu_bus_dmamap_load_something1()
602 (uintmax_t)tag->common.highaddr)); in iommu_bus_dmamap_load_something1()
604 tag->common.boundary), in iommu_bus_dmamap_load_something1()
607 (uintmax_t)entry->end, (uintmax_t)tag->common.boundary)); in iommu_bus_dmamap_load_something1()
608 KASSERT(buflen1 <= tag->common.maxsegsz, in iommu_bus_dmamap_load_something1()
612 (uintmax_t)buflen1, (uintmax_t)tag->common.maxsegsz)); in iommu_bus_dmamap_load_something1()
632 iommu_bus_dmamap_load_something(struct bus_dma_tag_iommu *tag, in iommu_bus_dmamap_load_something() argument
641 ctx = tag->ctx; in iommu_bus_dmamap_load_something()
646 error = iommu_bus_dmamap_load_something1(tag, map, ma, offset, in iommu_bus_dmamap_load_something()
678 struct bus_dma_tag_iommu *tag; in iommu_bus_dmamap_load_ma() local
681 tag = (struct bus_dma_tag_iommu *)dmat; in iommu_bus_dmamap_load_ma()
683 return (iommu_bus_dmamap_load_something(tag, map, ma, ma_offs, tlen, in iommu_bus_dmamap_load_ma()
692 struct bus_dma_tag_iommu *tag; in iommu_bus_dmamap_load_phys() local
698 tag = (struct bus_dma_tag_iommu *)dmat; in iommu_bus_dmamap_load_phys()
731 error = iommu_bus_dmamap_load_something(tag, map, ma, offset, buflen, in iommu_bus_dmamap_load_phys()
743 struct bus_dma_tag_iommu *tag; in iommu_bus_dmamap_load_buffer() local
749 tag = (struct bus_dma_tag_iommu *)dmat; in iommu_bus_dmamap_load_buffer()
784 error = iommu_bus_dmamap_load_something(tag, map, ma, offset, buflen, in iommu_bus_dmamap_load_buffer()
801 map->tag = (struct bus_dma_tag_iommu *)dmat; in iommu_bus_dmamap_waitok()
810 struct bus_dma_tag_iommu *tag; in iommu_bus_dmamap_complete() local
813 tag = (struct bus_dma_tag_iommu *)dmat; in iommu_bus_dmamap_complete()
824 (tag->common.lockfunc)(tag->common.lockfuncarg, BUS_DMA_LOCK); in iommu_bus_dmamap_complete()
829 segs = tag->segments; in iommu_bus_dmamap_complete()
846 struct bus_dma_tag_iommu *tag; in iommu_bus_dmamap_unload() local
852 tag = (struct bus_dma_tag_iommu *)dmat; in iommu_bus_dmamap_unload()
854 ctx = tag->ctx; in iommu_bus_dmamap_unload()
923 struct bus_dma_tag_iommu *tag; in iommu_bus_task_dmamap() local
932 tag = map->tag; in iommu_bus_task_dmamap()
935 bus_dmamap_load_mem((bus_dma_tag_t)tag, (bus_dmamap_t)map, in iommu_bus_task_dmamap()
940 (tag->common.lockfunc)(tag->common.lockfuncarg, in iommu_bus_task_dmamap()
996 struct bus_dma_tag_iommu *tag; in bus_dma_iommu_load_ident() local
1016 tag = (struct bus_dma_tag_iommu *)dmat; in bus_dma_iommu_load_ident()
1017 ctx = tag->ctx; in bus_dma_iommu_load_ident()