Searched refs:iovad (Results 1 – 5 of 5) sorted by relevance
/linux-5.19.10/drivers/iommu/ |
D | iova.c | 20 static bool iova_rcache_insert(struct iova_domain *iovad, 23 static unsigned long iova_rcache_get(struct iova_domain *iovad, 26 static void free_cpu_cached_iovas(unsigned int cpu, struct iova_domain *iovad); 27 static void free_iova_rcaches(struct iova_domain *iovad); 31 struct iova_domain *iovad; in iova_cpuhp_dead() local 33 iovad = hlist_entry_safe(node, struct iova_domain, cpuhp_dead); in iova_cpuhp_dead() 35 free_cpu_cached_iovas(cpu, iovad); in iova_cpuhp_dead() 39 static void free_global_cached_iovas(struct iova_domain *iovad); 47 init_iova_domain(struct iova_domain *iovad, unsigned long granule, in init_iova_domain() argument 57 spin_lock_init(&iovad->iova_rbtree_lock); in init_iova_domain() [all …]
|
D | dma-iommu.c | 48 struct iova_domain iovad; member 136 free_iova_fast(&cookie->iovad, in fq_ring_free() 284 return cookie->iovad.granule; in cookie_msi_granule() 361 if (cookie->type == IOMMU_DMA_IOVA_COOKIE && cookie->iovad.granule) { in iommu_put_dma_cookie() 363 put_iova_domain(&cookie->iovad); in iommu_put_dma_cookie() 396 struct iova_domain *iovad = &cookie->iovad; in cookie_init_hw_msi_region() local 400 start -= iova_offset(iovad, start); in cookie_init_hw_msi_region() 401 num_pages = iova_align(iovad, end - start) >> iova_shift(iovad); in cookie_init_hw_msi_region() 412 start += iovad->granule; in cookie_init_hw_msi_region() 428 struct iova_domain *iovad) in iova_reserve_pci_windows() argument [all …]
|
/linux-5.19.10/include/linux/ |
D | iova.h | 48 static inline unsigned long iova_shift(struct iova_domain *iovad) in iova_shift() argument 50 return __ffs(iovad->granule); in iova_shift() 53 static inline unsigned long iova_mask(struct iova_domain *iovad) in iova_mask() argument 55 return iovad->granule - 1; in iova_mask() 58 static inline size_t iova_offset(struct iova_domain *iovad, dma_addr_t iova) in iova_offset() argument 60 return iova & iova_mask(iovad); in iova_offset() 63 static inline size_t iova_align(struct iova_domain *iovad, size_t size) in iova_align() argument 65 return ALIGN(size, iovad->granule); in iova_align() 68 static inline dma_addr_t iova_dma_addr(struct iova_domain *iovad, struct iova *iova) in iova_dma_addr() argument 70 return (dma_addr_t)iova->pfn_lo << iova_shift(iovad); in iova_dma_addr() [all …]
|
D | intel-iommu.h | 544 struct iova_domain iovad; /* iova's that belong to this domain */ member
|
/linux-5.19.10/drivers/vdpa/vdpa_user/ |
D | iova_domain.c | 288 vduse_domain_alloc_iova(struct iova_domain *iovad, in vduse_domain_alloc_iova() argument 291 unsigned long shift = iova_shift(iovad); in vduse_domain_alloc_iova() 292 unsigned long iova_len = iova_align(iovad, size) >> shift; in vduse_domain_alloc_iova() 295 iova_pfn = alloc_iova_fast(iovad, iova_len, limit >> shift, true); in vduse_domain_alloc_iova() 300 static void vduse_domain_free_iova(struct iova_domain *iovad, in vduse_domain_free_iova() argument 303 unsigned long shift = iova_shift(iovad); in vduse_domain_free_iova() 304 unsigned long iova_len = iova_align(iovad, size) >> shift; in vduse_domain_free_iova() 306 free_iova_fast(iovad, iova >> shift, iova_len); in vduse_domain_free_iova() 314 struct iova_domain *iovad = &domain->stream_iovad; in vduse_domain_map_page() local 317 dma_addr_t iova = vduse_domain_alloc_iova(iovad, size, limit); in vduse_domain_map_page() [all …]
|