Lines Matching refs:tlb_addr

511 static void swiotlb_bounce(struct device *dev, phys_addr_t tlb_addr, size_t size,  in swiotlb_bounce()  argument
515 int index = (tlb_addr - mem->start) >> IO_TLB_SHIFT; in swiotlb_bounce()
519 unsigned char *vaddr = mem->vaddr + tlb_addr - mem->start; in swiotlb_bounce()
525 tlb_offset = tlb_addr & (IO_TLB_SIZE - 1); in swiotlb_bounce()
735 phys_addr_t tlb_addr; in swiotlb_tbl_map_single() local
769 tlb_addr = slot_addr(mem->start, index) + offset; in swiotlb_tbl_map_single()
777 swiotlb_bounce(dev, tlb_addr, mapping_size, DMA_TO_DEVICE); in swiotlb_tbl_map_single()
778 return tlb_addr; in swiotlb_tbl_map_single()
781 static void swiotlb_release_slots(struct device *dev, phys_addr_t tlb_addr) in swiotlb_release_slots() argument
785 unsigned int offset = swiotlb_align_offset(dev, tlb_addr); in swiotlb_release_slots()
786 int index = (tlb_addr - offset - mem->start) >> IO_TLB_SHIFT; in swiotlb_release_slots()
831 void swiotlb_tbl_unmap_single(struct device *dev, phys_addr_t tlb_addr, in swiotlb_tbl_unmap_single() argument
840 swiotlb_bounce(dev, tlb_addr, mapping_size, DMA_FROM_DEVICE); in swiotlb_tbl_unmap_single()
842 swiotlb_release_slots(dev, tlb_addr); in swiotlb_tbl_unmap_single()
845 void swiotlb_sync_single_for_device(struct device *dev, phys_addr_t tlb_addr, in swiotlb_sync_single_for_device() argument
849 swiotlb_bounce(dev, tlb_addr, size, DMA_TO_DEVICE); in swiotlb_sync_single_for_device()
854 void swiotlb_sync_single_for_cpu(struct device *dev, phys_addr_t tlb_addr, in swiotlb_sync_single_for_cpu() argument
858 swiotlb_bounce(dev, tlb_addr, size, DMA_FROM_DEVICE); in swiotlb_sync_single_for_cpu()
954 phys_addr_t tlb_addr; in swiotlb_alloc() local
964 tlb_addr = slot_addr(mem->start, index); in swiotlb_alloc()
966 return pfn_to_page(PFN_DOWN(tlb_addr)); in swiotlb_alloc()
971 phys_addr_t tlb_addr = page_to_phys(page); in swiotlb_free() local
973 if (!is_swiotlb_buffer(dev, tlb_addr)) in swiotlb_free()
976 swiotlb_release_slots(dev, tlb_addr); in swiotlb_free()