Lines Matching refs:tlb_addr
395 static void swiotlb_bounce(struct device *dev, phys_addr_t tlb_addr, size_t size, in swiotlb_bounce() argument
399 int index = (tlb_addr - mem->start) >> IO_TLB_SHIFT; in swiotlb_bounce()
403 unsigned char *vaddr = mem->vaddr + tlb_addr - mem->start; in swiotlb_bounce()
409 tlb_offset = tlb_addr & (IO_TLB_SIZE - 1); in swiotlb_bounce()
584 phys_addr_t tlb_addr; in swiotlb_tbl_map_single() local
615 tlb_addr = slot_addr(mem->start, index) + offset; in swiotlb_tbl_map_single()
623 swiotlb_bounce(dev, tlb_addr, mapping_size, DMA_TO_DEVICE); in swiotlb_tbl_map_single()
624 return tlb_addr; in swiotlb_tbl_map_single()
627 static void swiotlb_release_slots(struct device *dev, phys_addr_t tlb_addr) in swiotlb_release_slots() argument
631 unsigned int offset = swiotlb_align_offset(dev, tlb_addr); in swiotlb_release_slots()
632 int index = (tlb_addr - offset - mem->start) >> IO_TLB_SHIFT; in swiotlb_release_slots()
673 void swiotlb_tbl_unmap_single(struct device *dev, phys_addr_t tlb_addr, in swiotlb_tbl_unmap_single() argument
682 swiotlb_bounce(dev, tlb_addr, mapping_size, DMA_FROM_DEVICE); in swiotlb_tbl_unmap_single()
684 swiotlb_release_slots(dev, tlb_addr); in swiotlb_tbl_unmap_single()
687 void swiotlb_sync_single_for_device(struct device *dev, phys_addr_t tlb_addr, in swiotlb_sync_single_for_device() argument
691 swiotlb_bounce(dev, tlb_addr, size, DMA_TO_DEVICE); in swiotlb_sync_single_for_device()
696 void swiotlb_sync_single_for_cpu(struct device *dev, phys_addr_t tlb_addr, in swiotlb_sync_single_for_cpu() argument
700 swiotlb_bounce(dev, tlb_addr, size, DMA_FROM_DEVICE); in swiotlb_sync_single_for_cpu()
788 phys_addr_t tlb_addr; in swiotlb_alloc() local
798 tlb_addr = slot_addr(mem->start, index); in swiotlb_alloc()
800 return pfn_to_page(PFN_DOWN(tlb_addr)); in swiotlb_alloc()
805 phys_addr_t tlb_addr = page_to_phys(page); in swiotlb_free() local
807 if (!is_swiotlb_buffer(dev, tlb_addr)) in swiotlb_free()
810 swiotlb_release_slots(dev, tlb_addr); in swiotlb_free()