Home
last modified time | relevance | path

Searched refs:iopt (Results 1 – 8 of 8) sorted by relevance

/linux/drivers/iommu/iommufd/
H A Dio_pagetable.c32 struct io_pagetable *iopt, in iopt_area_contig_init() argument
36 lockdep_assert_held(&iopt->iova_rwsem); in iopt_area_contig_init()
40 iter->area = iopt_area_iter_first(iopt, iova, iova); in iopt_area_contig_init()
109 static int iopt_alloc_iova(struct io_pagetable *iopt, unsigned long *iova, in iopt_alloc_iova() argument
118 lockdep_assert_held(&iopt->iova_rwsem); in iopt_alloc_iova()
142 if (iova_alignment < iopt->iova_alignment) in iopt_alloc_iova()
145 interval_tree_for_each_span(&allowed_span, &iopt->allowed_itree, in iopt_alloc_iova()
147 if (RB_EMPTY_ROOT(&iopt->allowed_itree.rb_root)) { in iopt_alloc_iova()
158 &used_span, &iopt->reserved_itree, &iopt->area_itree, in iopt_alloc_iova()
172 static int iopt_check_iova(struct io_pagetable *iopt, unsigned long iova, in iopt_check_iova() argument
[all …]
H A Diommufd_private.h61 void iopt_init_table(struct io_pagetable *iopt);
62 void iopt_destroy_table(struct io_pagetable *iopt);
63 int iopt_get_pages(struct io_pagetable *iopt, unsigned long iova,
69 int iopt_map_user_pages(struct iommufd_ctx *ictx, struct io_pagetable *iopt,
73 int iopt_map_file_pages(struct iommufd_ctx *ictx, struct io_pagetable *iopt,
77 int iopt_map_pages(struct io_pagetable *iopt, struct list_head *pages_list,
80 int iopt_unmap_iova(struct io_pagetable *iopt, unsigned long iova,
82 int iopt_unmap_all(struct io_pagetable *iopt, unsigned long *unmapped);
84 int iopt_read_and_clear_dirty_data(struct io_pagetable *iopt,
88 int iopt_set_dirty_tracking(struct io_pagetable *iopt,
[all …]
H A Ddevice.c338 rc = iopt_table_enforce_dev_resv_regions(&hwpt_paging->ioas->iopt, in iommufd_device_attach_reserved_iova()
347 iopt_remove_reserved_iova(&hwpt_paging->ioas->iopt, in iommufd_device_attach_reserved_iova()
393 iopt_remove_reserved_iova(&hwpt_paging->ioas->iopt, idev->dev); in iommufd_hw_pagetable_attach()
412 iopt_remove_reserved_iova(&hwpt_paging->ioas->iopt, idev->dev); in iommufd_hw_pagetable_detach()
440 iopt_remove_reserved_iova(&hwpt_paging->ioas->iopt, cur->dev); in iommufd_group_remove_reserved_iova()
457 &hwpt_paging->ioas->iopt, cur->dev, NULL); in iommufd_group_do_replace_reserved_iova()
764 rc = iopt_add_access(&new_ioas->iopt, access); in iommufd_access_change_ioas()
778 iopt_remove_access(&cur_ioas->iopt, access, iopt_access_list_id); in iommufd_access_change_ioas()
929 void iommufd_access_notify_unmap(struct io_pagetable *iopt, unsigned long iova, in iommufd_access_notify_unmap() argument
933 container_of(iopt, struct iommufd_ioas, iopt); in iommufd_access_notify_unmap()
[all …]
H A Dioas.c18 rc = iopt_unmap_all(&ioas->iopt, NULL); in iommufd_ioas_destroy()
20 iopt_destroy_table(&ioas->iopt); in iommufd_ioas_destroy()
32 iopt_init_table(&ioas->iopt); in iommufd_ioas_alloc()
82 down_read(&ioas->iopt.iova_rwsem); in iommufd_ioas_iova_ranges()
86 cmd->out_iova_alignment = ioas->iopt.iova_alignment; in iommufd_ioas_iova_ranges()
87 interval_tree_for_each_span(&span, &ioas->iopt.reserved_itree, 0, in iommufd_ioas_iova_ranges()
111 up_read(&ioas->iopt.iova_rwsem); in iommufd_ioas_iova_ranges()
152 struct io_pagetable *iopt; in iommufd_ioas_allow_iovas() local
161 iopt = &ioas->iopt; in iommufd_ioas_allow_iovas()
176 rc = iopt_set_allow_iova(iopt, &allowed_iova); in iommufd_ioas_allow_iovas()
[all …]
H A Dvfio_compat.c191 rc = iopt_map_user_pages(ictx, &ioas->iopt, &iova, u64_to_user_ptr(map.vaddr), in iommufd_vfio_map_dma()
228 rc = iopt_unmap_all(&ioas->iopt, &unmapped); in iommufd_vfio_unmap_dma()
230 if (READ_ONCE(ioas->iopt.disable_large_pages)) { in iommufd_vfio_unmap_dma()
239 rc = iopt_cut_iova(&ioas->iopt, iovas, in iommufd_vfio_unmap_dma()
244 rc = iopt_unmap_iova(&ioas->iopt, unmap.iova, unmap.size, in iommufd_vfio_unmap_dma()
346 rc = iopt_disable_large_pages(&ioas->iopt); in iommufd_vfio_set_iommu()
353 struct io_pagetable *iopt = &ioas->iopt; in iommufd_get_pagesizes() local
358 down_read(&iopt->domains_rwsem); in iommufd_get_pagesizes()
359 xa_for_each(&iopt->domains, index, domain) in iommufd_get_pagesizes()
367 pgsize_bitmap = max(pgsize_bitmap, ioas->iopt.iova_alignment); in iommufd_get_pagesizes()
[all …]
H A Dio_pagetable.h42 struct io_pagetable *iopt; member
119 struct io_pagetable *iopt, unsigned long start, \
124 lockdep_assert_held(&iopt->iova_rwsem); \
125 node = interval_tree_iter_first(&iopt->name##_itree, start, \
153 struct io_pagetable *iopt,
168 #define iopt_for_each_contig_area(iter, area, iopt, iova, last_iova) \ argument
169 for (area = iopt_area_contig_init(iter, iopt, iova, last_iova); area; \
H A Dpages.c493 bool disable_large_pages = area->iopt->disable_large_pages; in batch_to_domain()
1603 lockdep_assert_held(&area->iopt->domains_rwsem); in iopt_area_fill_domains()
1605 if (xa_empty(&area->iopt->domains)) in iopt_area_fill_domains()
1617 xa_for_each(&area->iopt->domains, index, domain) { in iopt_area_fill_domains()
1633 area->storage_domain = xa_load(&area->iopt->domains, 0); in iopt_area_fill_domains()
1639 xa_for_each(&area->iopt->domains, unmap_index, domain) { in iopt_area_fill_domains()
1652 if (unmap_index != area->iopt->next_domain_id - 1) { in iopt_area_fill_domains()
1679 struct io_pagetable *iopt = area->iopt; in iopt_area_unfill_domains() local
1683 lockdep_assert_held(&iopt->domains_rwsem); in iopt_area_unfill_domains()
1689 xa_for_each(&iopt->domains, index, domain) in iopt_area_unfill_domains()
/linux/drivers/dma/ppc4xx/
H A Ddma.h217 u32 iopt; member