Lines Matching refs:hwdev

477 phys_addr_t swiotlb_tbl_map_single(struct device *hwdev,  in swiotlb_tbl_map_single()  argument
498 mask = dma_get_seg_boundary(hwdev); in swiotlb_tbl_map_single()
574 dev_warn(hwdev, "swiotlb buffer is full (sz: %zd bytes)\n", size); in swiotlb_tbl_map_single()
597 map_single(struct device *hwdev, phys_addr_t phys, size_t size, in map_single() argument
603 dev_warn_ratelimited(hwdev, "Cannot do DMA to address %pa\n", in map_single()
608 start_dma_addr = __phys_to_dma(hwdev, io_tlb_start); in map_single()
609 return swiotlb_tbl_map_single(hwdev, start_dma_addr, phys, size, in map_single()
616 void swiotlb_tbl_unmap_single(struct device *hwdev, phys_addr_t tlb_addr, in swiotlb_tbl_unmap_single() argument
661 void swiotlb_tbl_sync_single(struct device *hwdev, phys_addr_t tlb_addr, in swiotlb_tbl_sync_single() argument
845 static void unmap_single(struct device *hwdev, dma_addr_t dev_addr, in unmap_single() argument
849 phys_addr_t paddr = dma_to_phys(hwdev, dev_addr); in unmap_single()
854 swiotlb_tbl_unmap_single(hwdev, paddr, size, dir, attrs); in unmap_single()
870 void swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, in swiotlb_unmap_page() argument
874 unmap_single(hwdev, dev_addr, size, dir, attrs); in swiotlb_unmap_page()
888 swiotlb_sync_single(struct device *hwdev, dma_addr_t dev_addr, in swiotlb_sync_single() argument
892 phys_addr_t paddr = dma_to_phys(hwdev, dev_addr); in swiotlb_sync_single()
897 swiotlb_tbl_sync_single(hwdev, paddr, size, dir, target); in swiotlb_sync_single()
908 swiotlb_sync_single_for_cpu(struct device *hwdev, dma_addr_t dev_addr, in swiotlb_sync_single_for_cpu() argument
911 swiotlb_sync_single(hwdev, dev_addr, size, dir, SYNC_FOR_CPU); in swiotlb_sync_single_for_cpu()
915 swiotlb_sync_single_for_device(struct device *hwdev, dma_addr_t dev_addr, in swiotlb_sync_single_for_device() argument
918 swiotlb_sync_single(hwdev, dev_addr, size, dir, SYNC_FOR_DEVICE); in swiotlb_sync_single_for_device()
938 swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems, in swiotlb_map_sg_attrs() argument
948 dma_addr_t dev_addr = phys_to_dma(hwdev, paddr); in swiotlb_map_sg_attrs()
951 !dma_capable(hwdev, dev_addr, sg->length)) { in swiotlb_map_sg_attrs()
952 phys_addr_t map = map_single(hwdev, sg_phys(sg), in swiotlb_map_sg_attrs()
957 swiotlb_full(hwdev, sg->length, dir, 0); in swiotlb_map_sg_attrs()
959 swiotlb_unmap_sg_attrs(hwdev, sgl, i, dir, in swiotlb_map_sg_attrs()
964 sg->dma_address = __phys_to_dma(hwdev, map); in swiotlb_map_sg_attrs()
977 swiotlb_unmap_sg_attrs(struct device *hwdev, struct scatterlist *sgl, in swiotlb_unmap_sg_attrs() argument
987 unmap_single(hwdev, sg->dma_address, sg_dma_len(sg), dir, in swiotlb_unmap_sg_attrs()
999 swiotlb_sync_sg(struct device *hwdev, struct scatterlist *sgl, in swiotlb_sync_sg() argument
1007 swiotlb_sync_single(hwdev, sg->dma_address, in swiotlb_sync_sg()
1012 swiotlb_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg, in swiotlb_sync_sg_for_cpu() argument
1015 swiotlb_sync_sg(hwdev, sg, nelems, dir, SYNC_FOR_CPU); in swiotlb_sync_sg_for_cpu()
1019 swiotlb_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, in swiotlb_sync_sg_for_device() argument
1022 swiotlb_sync_sg(hwdev, sg, nelems, dir, SYNC_FOR_DEVICE); in swiotlb_sync_sg_for_device()
1026 swiotlb_dma_mapping_error(struct device *hwdev, dma_addr_t dma_addr) in swiotlb_dma_mapping_error() argument
1028 return (dma_addr == __phys_to_dma(hwdev, io_tlb_overflow_buffer)); in swiotlb_dma_mapping_error()
1038 swiotlb_dma_supported(struct device *hwdev, u64 mask) in swiotlb_dma_supported() argument
1040 return __phys_to_dma(hwdev, io_tlb_end - 1) <= mask; in swiotlb_dma_supported()