Home
last modified time | relevance | path

Searched refs:iovad (Results 1 – 4 of 4) sorted by relevance

/linux-6.1.9/drivers/iommu/
Diova.c20 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);
36 struct iova_domain *iovad; in iova_cpuhp_dead() local
38 iovad = hlist_entry_safe(node, struct iova_domain, cpuhp_dead); in iova_cpuhp_dead()
40 free_cpu_cached_iovas(cpu, iovad); in iova_cpuhp_dead()
44 static void free_global_cached_iovas(struct iova_domain *iovad);
52 init_iova_domain(struct iova_domain *iovad, unsigned long granule, in init_iova_domain() argument
62 spin_lock_init(&iovad->iova_rbtree_lock); in init_iova_domain()
[all …]
Ddma-iommu.c50 struct iova_domain iovad; member
139 free_iova_fast(&cookie->iovad, in fq_ring_free()
287 return cookie->iovad.granule; in cookie_msi_granule()
365 if (cookie->type == IOMMU_DMA_IOVA_COOKIE && cookie->iovad.granule) { in iommu_put_dma_cookie()
367 put_iova_domain(&cookie->iovad); in iommu_put_dma_cookie()
400 struct iova_domain *iovad = &cookie->iovad; in cookie_init_hw_msi_region() local
404 start -= iova_offset(iovad, start); in cookie_init_hw_msi_region()
405 num_pages = iova_align(iovad, end - start) >> iova_shift(iovad); in cookie_init_hw_msi_region()
416 start += iovad->granule; in cookie_init_hw_msi_region()
432 struct iova_domain *iovad) in iova_reserve_pci_windows() argument
[all …]
/linux-6.1.9/include/linux/
Diova.h48 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 …]
/linux-6.1.9/drivers/vdpa/vdpa_user/
Diova_domain.c355 vduse_domain_alloc_iova(struct iova_domain *iovad, in vduse_domain_alloc_iova() argument
358 unsigned long shift = iova_shift(iovad); in vduse_domain_alloc_iova()
359 unsigned long iova_len = iova_align(iovad, size) >> shift; in vduse_domain_alloc_iova()
362 iova_pfn = alloc_iova_fast(iovad, iova_len, limit >> shift, true); in vduse_domain_alloc_iova()
367 static void vduse_domain_free_iova(struct iova_domain *iovad, in vduse_domain_free_iova() argument
370 unsigned long shift = iova_shift(iovad); in vduse_domain_free_iova()
371 unsigned long iova_len = iova_align(iovad, size) >> shift; in vduse_domain_free_iova()
373 free_iova_fast(iovad, iova >> shift, iova_len); in vduse_domain_free_iova()
381 struct iova_domain *iovad = &domain->stream_iovad; in vduse_domain_map_page() local
384 dma_addr_t iova = vduse_domain_alloc_iova(iovad, size, limit); in vduse_domain_map_page()
[all …]