/openbmc/linux/drivers/iommu/ |
H A D | tegra-gart.c | 60 #define for_each_gart_pte(gart, iova) \ argument 66 unsigned long iova, unsigned long pte) in gart_set_pte() 73 unsigned long iova) in gart_read_pte() 85 unsigned long iova; in do_gart_setup() local 95 unsigned long iova, size_t bytes) in gart_iova_range_invalid() 101 static inline bool gart_pte_valid(struct gart_device *gart, unsigned long iova) in gart_pte_valid() 167 static inline int __gart_iommu_map(struct gart_device *gart, unsigned long iova, in __gart_iommu_map() 180 static int gart_iommu_map(struct iommu_domain *domain, unsigned long iova, in gart_iommu_map() 197 unsigned long iova) in __gart_iommu_unmap() 209 static size_t gart_iommu_unmap(struct iommu_domain *domain, unsigned long iova, in gart_iommu_unmap() [all …]
|
H A D | iova.c | 152 iova_insert_rbtree(struct rb_root *root, struct iova *iova, in iova_insert_rbtree() 248 static void free_iova_mem(struct iova *iova) in free_iova_mem() 345 struct iova *iova = to_iova(node); in private_find_iova() local 358 static void remove_iova(struct iova_domain *iovad, struct iova *iova) in remove_iova() 375 struct iova *iova; in find_iova() local 392 __free_iova(struct iova_domain *iovad, struct iova *iova) in __free_iova() 414 struct iova *iova; in free_iova() local 510 struct iova *iova, *tmp; in put_iova_domain() local 524 struct iova *iova = to_iova(node); in __is_range_overlap() local 534 struct iova *iova; in alloc_and_init_iova() local [all …]
|
H A D | io-pgtable-dart.c | 124 unsigned long iova, phys_addr_t paddr, in dart_init_pte() 173 static int dart_get_table(struct dart_io_pgtable *data, unsigned long iova) in dart_get_table() 179 static int dart_get_l1_index(struct dart_io_pgtable *data, unsigned long iova) in dart_get_l1_index() 186 static int dart_get_l2_index(struct dart_io_pgtable *data, unsigned long iova) in dart_get_l2_index() 193 static dart_iopte *dart_get_l2(struct dart_io_pgtable *data, unsigned long iova) in dart_get_l2() 236 static int dart_map_pages(struct io_pgtable_ops *ops, unsigned long iova, in dart_map_pages() 297 static size_t dart_unmap_pages(struct io_pgtable_ops *ops, unsigned long iova, in dart_unmap_pages() 341 unsigned long iova) in dart_iova_to_phys()
|
H A D | tegra-smmu.c | 156 static unsigned int iova_pd_index(unsigned long iova) in iova_pd_index() 161 static unsigned int iova_pt_index(unsigned long iova) in iova_pt_index() 223 unsigned long iova) in smmu_flush_tlb_section() 238 unsigned long iova) in smmu_flush_tlb_group() 531 static void tegra_smmu_set_pde(struct tegra_smmu_as *as, unsigned long iova, in tegra_smmu_set_pde() 552 static u32 *tegra_smmu_pte_offset(struct page *pt_page, unsigned long iova) in tegra_smmu_pte_offset() 559 static u32 *tegra_smmu_pte_lookup(struct tegra_smmu_as *as, unsigned long iova, in tegra_smmu_pte_lookup() 577 static u32 *as_get_pte(struct tegra_smmu_as *as, dma_addr_t iova, in as_get_pte() 615 static void tegra_smmu_pte_get_use(struct tegra_smmu_as *as, unsigned long iova) in tegra_smmu_pte_get_use() 622 static void tegra_smmu_pte_put_use(struct tegra_smmu_as *as, unsigned long iova) in tegra_smmu_pte_put_use() [all …]
|
H A D | sun50i-iommu.c | 165 static u32 sun50i_iova_get_dte_index(dma_addr_t iova) in sun50i_iova_get_dte_index() 170 static u32 sun50i_iova_get_pte_index(dma_addr_t iova) in sun50i_iova_get_pte_index() 175 static u32 sun50i_iova_get_page_offset(dma_addr_t iova) in sun50i_iova_get_page_offset() 301 unsigned long iova) in sun50i_iommu_zap_iova() 318 unsigned long iova) in sun50i_iommu_zap_ptw_cache() 334 unsigned long iova, size_t size) in sun50i_iommu_zap_range() 406 unsigned long iova, size_t size) in sun50i_iommu_iotlb_sync_map() 554 dma_addr_t iova, gfp_t gfp) in sun50i_dte_get_page_table() 592 static int sun50i_iommu_map(struct iommu_domain *domain, unsigned long iova, in sun50i_iommu_map() 625 static size_t sun50i_iommu_unmap(struct iommu_domain *domain, unsigned long iova, in sun50i_iommu_unmap() [all …]
|
H A D | exynos-iommu.c | 97 #define section_offs(iova) (iova & (SECT_SIZE - 1)) argument 99 #define lpage_offs(iova) (iova & (LPAGE_SIZE - 1)) argument 101 #define spage_offs(iova) (iova & (SPAGE_SIZE - 1)) argument 106 static u32 lv1ent_offset(sysmmu_iova_t iova) in lv1ent_offset() 111 static u32 lv2ent_offset(sysmmu_iova_t iova) in lv2ent_offset() 177 static sysmmu_pte_t *section_entry(sysmmu_pte_t *pgtable, sysmmu_iova_t iova) in section_entry() 182 static sysmmu_pte_t *page_entry(sysmmu_pte_t *sent, sysmmu_iova_t iova) in page_entry() 451 sysmmu_iova_t iova, unsigned int num_inv) in __sysmmu_tlb_invalidate_entry() 669 sysmmu_iova_t iova) in sysmmu_tlb_invalidate_flpdcache() 689 sysmmu_iova_t iova, size_t size) in sysmmu_tlb_invalidate_entry() [all …]
|
H A D | rockchip-iommu.c | 320 static u32 rk_iova_dte_index(dma_addr_t iova) in rk_iova_dte_index() 325 static u32 rk_iova_pte_index(dma_addr_t iova) in rk_iova_pte_index() 330 static u32 rk_iova_page_offset(dma_addr_t iova) in rk_iova_page_offset() 367 dma_addr_t iova; in rk_iommu_zap_lines() local 533 static void log_iova(struct rk_iommu *iommu, int index, dma_addr_t iova) in log_iova() 585 dma_addr_t iova; in rk_iommu_irq() local 650 dma_addr_t iova) in rk_iommu_iova_to_phys() 678 dma_addr_t iova, size_t size) in rk_iommu_zap_iova() 707 dma_addr_t iova, size_t size) in rk_iommu_zap_iova_first_last() 716 dma_addr_t iova) in rk_dte_get_page_table() [all …]
|
H A D | io-pgtable-arm-v7s.c | 432 unsigned long iova, phys_addr_t paddr, int prot, in arm_v7s_init_pte() 497 static int __arm_v7s_map(struct arm_v7s_io_pgtable *data, unsigned long iova, in __arm_v7s_map() 544 static int arm_v7s_map_pages(struct io_pgtable_ops *ops, unsigned long iova, in arm_v7s_map_pages() 595 unsigned long iova, int idx, int lvl, in arm_v7s_split_cont() 622 unsigned long iova, size_t size, in arm_v7s_split_blk_unmap() 667 unsigned long iova, size_t size, int lvl, in __arm_v7s_unmap() 737 static size_t arm_v7s_unmap_pages(struct io_pgtable_ops *ops, unsigned long iova, in arm_v7s_unmap_pages() 760 unsigned long iova) in arm_v7s_iova_to_phys() 902 static void __init dummy_tlb_flush(unsigned long iova, size_t size, in dummy_tlb_flush() 910 unsigned long iova, size_t granule, in dummy_tlb_add_page() [all …]
|
/openbmc/linux/include/linux/ |
H A D | iova.h | 18 struct iova { struct 27 /* holds all the iova translations for a domain */ argument 43 static inline unsigned long iova_size(struct iova *iova) in iova_size() 58 static inline size_t iova_offset(struct iova_domain *iovad, dma_addr_t iova) in iova_offset() 68 static inline dma_addr_t iova_dma_addr(struct iova_domain *iovad, struct iova *iova) in iova_dma_addr() 73 static inline unsigned long iova_pfn(struct iova_domain *iovad, dma_addr_t iova) in iova_pfn() 114 static inline void __free_iova(struct iova_domain *iovad, struct iova *iova) in __free_iova()
|
H A D | iommufd.h | 84 unsigned long iova, in iommufd_access_pin_pages() 93 unsigned long iova, in iommufd_access_unpin_pages() 98 static inline int iommufd_access_rw(struct iommufd_access *access, unsigned long iova, in iommufd_access_rw()
|
/openbmc/linux/drivers/vfio/ |
H A D | iova_bitmap.c | 36 unsigned long iova; member 112 unsigned long iova; member 127 static unsigned long iova_bitmap_offset_to_index(struct iova_bitmap *bitmap, in iova_bitmap_offset_to_index() 238 struct iova_bitmap *iova_bitmap_alloc(unsigned long iova, size_t length, in iova_bitmap_alloc() 317 unsigned long iova = iova_bitmap_mapped_iova(bitmap); in iova_bitmap_mapped_length() local 350 unsigned long iova = iova_bitmap_mapped_length(bitmap) - 1; in iova_bitmap_advance() local 403 unsigned long iova, size_t length) in iova_bitmap_set()
|
H A D | vfio_iommu_type1.c | 90 dma_addr_t iova; /* Device address */ member 129 dma_addr_t iova; /* Device address */ member 136 dma_addr_t iova; member 323 static struct vfio_pfn *vfio_find_vpfn(struct vfio_dma *dma, dma_addr_t iova) in vfio_find_vpfn() 367 static int vfio_add_to_pfn_list(struct vfio_dma *dma, dma_addr_t iova, in vfio_add_to_pfn_list() 391 unsigned long iova) in vfio_iova_get_vfio_pfn() 621 dma_addr_t iova = vaddr - dma->vaddr + dma->iova; in vfio_pin_pages_remote() local 724 static long vfio_unpin_pages_remote(struct vfio_dma *dma, dma_addr_t iova, in vfio_unpin_pages_remote() 779 static int vfio_unpin_page_external(struct vfio_dma *dma, dma_addr_t iova, in vfio_unpin_page_external() 839 dma_addr_t iova; in vfio_iommu_type1_pin_pages() local [all …]
|
/openbmc/linux/drivers/infiniband/sw/rxe/ |
H A D | rxe_mr.c | 27 int mr_check_range(struct rxe_mr *mr, u64 iova, size_t length) in mr_check_range() 75 static unsigned long rxe_mr_iova_to_index(struct rxe_mr *mr, u64 iova) in rxe_mr_iova_to_index() 80 static unsigned long rxe_mr_iova_to_page_offset(struct rxe_mr *mr, u64 iova) in rxe_mr_iova_to_page_offset() 129 int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, u64 iova, in rxe_mr_init_user() 245 static int rxe_mr_copy_xarray(struct rxe_mr *mr, u64 iova, void *addr, in rxe_mr_copy_xarray() 304 int rxe_mr_copy(struct rxe_mr *mr, u64 iova, void *addr, in rxe_mr_copy() 345 u64 iova; in copy_data() local 424 int rxe_flush_pmem_iova(struct rxe_mr *mr, u64 iova, unsigned int length) in rxe_flush_pmem_iova() 471 int rxe_mr_do_atomic_op(struct rxe_mr *mr, u64 iova, int opcode, in rxe_mr_do_atomic_op() 529 int rxe_mr_do_atomic_write(struct rxe_mr *mr, u64 iova, u64 value) in rxe_mr_do_atomic_write() [all …]
|
/openbmc/linux/drivers/fpga/ |
H A D | dfl-afu-dma-region.c | 125 u64 iova, u64 size) in dma_region_check_iova() 245 afu_dma_region_find(struct dfl_feature_platform_data *pdata, u64 iova, u64 size) in afu_dma_region_find() 285 afu_dma_region_find_iova(struct dfl_feature_platform_data *pdata, u64 iova) in afu_dma_region_find_iova() 302 u64 user_addr, u64 length, u64 *iova) in afu_dma_map_region() 380 int afu_dma_unmap_region(struct dfl_feature_platform_data *pdata, u64 iova) in afu_dma_unmap_region()
|
/openbmc/linux/tools/testing/selftests/iommu/ |
H A D | iommufd_fail_nth.c | 234 __u64 iova; in TEST_FAIL_NTH() local 304 __u64 iova; in TEST_FAIL_NTH() local 341 __u64 iova; in TEST_FAIL_NTH() local 386 __u64 iova; in TEST_FAIL_NTH() local 465 __u64 iova; in TEST_FAIL_NTH() local 521 __u64 iova; in TEST_FAIL_NTH() local 585 __u64 iova; in TEST_FAIL_NTH() local
|
/openbmc/linux/drivers/media/platform/nvidia/tegra-vde/ |
H A D | iommu.c | 24 struct iova *iova; in tegra_vde_iommu_map() local 51 void tegra_vde_iommu_unmap(struct tegra_vde *vde, struct iova *iova) in tegra_vde_iommu_unmap() 64 struct iova *iova; in tegra_vde_iommu_init() local
|
/openbmc/linux/drivers/iommu/amd/ |
H A D | io_pgtable_v2.c | 135 static u64 *v2_alloc_pte(int nid, u64 *pgd, unsigned long iova, in v2_alloc_pte() 199 unsigned long iova, unsigned long *page_size) in fetch_pte() 236 static int iommu_v2_map_pages(struct io_pgtable_ops *ops, unsigned long iova, in iommu_v2_map_pages() 289 unsigned long iova, in iommu_v2_unmap_pages() 317 static phys_addr_t iommu_v2_iova_to_phys(struct io_pgtable_ops *ops, unsigned long iova) in iommu_v2_iova_to_phys() 340 static void v2_tlb_flush_walk(unsigned long iova, size_t size, in v2_tlb_flush_walk() 346 unsigned long iova, size_t granule, in v2_tlb_add_page()
|
/openbmc/linux/drivers/vdpa/vdpa_user/ |
H A D | iova_domain.c | 104 u64 iova, u64 size, u64 paddr) in vduse_domain_map_bounce_page() 124 u64 iova, u64 size) in vduse_domain_unmap_bounce_page() 161 dma_addr_t iova, size_t size, in vduse_domain_bounce() 190 vduse_domain_get_coherent_page(struct vduse_iova_domain *domain, u64 iova) in vduse_domain_get_coherent_page() 211 vduse_domain_get_bounce_page(struct vduse_iova_domain *domain, u64 iova) in vduse_domain_get_bounce_page() 368 dma_addr_t iova, size_t size) in vduse_domain_free_iova() 384 dma_addr_t iova = vduse_domain_alloc_iova(iovad, size, limit); in vduse_domain_map_page() local 430 dma_addr_t iova = vduse_domain_alloc_iova(iovad, size, limit); in vduse_domain_alloc_coherent() local 488 unsigned long iova = vmf->pgoff << PAGE_SHIFT; in vduse_domain_mmap_fault() local
|
/openbmc/linux/drivers/gpu/drm/msm/ |
H A D | msm_iommu.c | 37 unsigned long iova, phys_addr_t paddr, in calc_pgsize() 91 static int msm_iommu_pagetable_unmap(struct msm_mmu *mmu, u64 iova, in msm_iommu_pagetable_unmap() 115 static int msm_iommu_pagetable_map(struct msm_mmu *mmu, u64 iova, in msm_iommu_pagetable_map() 219 static void msm_iommu_tlb_flush_walk(unsigned long iova, size_t size, in msm_iommu_tlb_flush_walk() 236 unsigned long iova, size_t granule, void *cookie) in msm_iommu_tlb_add_page() 323 unsigned long iova, int flags, void *arg) in msm_fault_handler() 361 static int msm_iommu_map(struct msm_mmu *mmu, uint64_t iova, in msm_iommu_map() 377 static int msm_iommu_unmap(struct msm_mmu *mmu, uint64_t iova, size_t len) in msm_iommu_unmap()
|
/openbmc/qemu/hw/vfio/ |
H A D | common.c | 292 hwaddr iova = iotlb->iova + giommu->iommu_offset; in vfio_iommu_map_notify() local 354 const hwaddr iova = section->offset_within_address_space; in vfio_ram_discard_notify_discard() local 373 hwaddr start, next, iova; in vfio_ram_discard_notify_populate() local 548 hwaddr iova; in vfio_get_section_iova_range() local 572 hwaddr iova, end; in vfio_listener_region_add() local 719 hwaddr iova, end; in vfio_listener_region_del() local 839 hwaddr iova, hwaddr end, in vfio_dirty_tracking_update_range() 885 hwaddr iova, end; in vfio_dirty_tracking_update() local 1108 static int vfio_device_dma_logging_report(VFIODevice *vbasedev, hwaddr iova, in vfio_device_dma_logging_report() 1135 VFIOBitmap *vbmap, hwaddr iova, hwaddr size, Error **errp) in vfio_devices_query_dirty_bitmap() [all …]
|
H A D | container-base.c | 19 hwaddr iova, ram_addr_t size, in vfio_container_dma_map() 29 hwaddr iova, ram_addr_t size, in vfio_container_dma_unmap() 77 VFIOBitmap *vbmap, hwaddr iova, hwaddr size, Error **errp) in vfio_container_query_dirty_bitmap()
|
/openbmc/linux/drivers/staging/media/ipu3/ |
H A D | ipu3-mmu.c | 154 static inline void address_to_pte_idx(unsigned long iova, u32 *l1pt_idx, in address_to_pte_idx() 210 static int __imgu_mmu_map(struct imgu_mmu *mmu, unsigned long iova, in __imgu_mmu_map() 251 int imgu_mmu_map(struct imgu_mmu_info *info, unsigned long iova, in imgu_mmu_map() 299 size_t imgu_mmu_map_sg(struct imgu_mmu_info *info, unsigned long iova, in imgu_mmu_map_sg() 339 unsigned long iova, size_t size) in __imgu_mmu_unmap() 379 size_t imgu_mmu_unmap(struct imgu_mmu_info *info, unsigned long iova, in imgu_mmu_unmap()
|
/openbmc/linux/drivers/iommu/iommufd/ |
H A D | selftest.c | 48 u64 *iova) in __iommufd_test_syz_conv_iova() 73 u64 *iova) in iommufd_test_syz_conv_iova() 88 unsigned int ioas_id, u64 *iova, u32 *flags) in iommufd_test_syz_conv_iova_id() 194 unsigned long iova, phys_addr_t paddr, in mock_domain_map_pages() 243 unsigned long iova, size_t pgsize, in mock_domain_unmap_pages() 287 dma_addr_t iova) in mock_domain_iova_to_phys() 530 unsigned int mockpt_id, unsigned long iova, in iommufd_test_md_check_pa() 629 unsigned long iova; member 651 static void iommufd_test_access_unmap(void *data, unsigned long iova, in iommufd_test_access_unmap() 842 unsigned int access_id, unsigned long iova, in iommufd_test_access_pages() [all …]
|
H A D | io_pagetable.c | 32 unsigned long iova, in iopt_area_contig_init() 108 static int iopt_alloc_iova(struct io_pagetable *iopt, unsigned long *iova, in iopt_alloc_iova() 171 static int iopt_check_iova(struct io_pagetable *iopt, unsigned long iova, in iopt_check_iova() 198 struct iopt_pages *pages, unsigned long iova, in iopt_insert_area() 250 unsigned long iova; in iopt_alloc_area_pages() local 406 unsigned long *iova, void __user *uptr, in iopt_map_user_pages() 435 int iopt_get_pages(struct io_pagetable *iopt, unsigned long iova, in iopt_get_pages() 565 int iopt_unmap_iova(struct io_pagetable *iopt, unsigned long iova, in iopt_unmap_iova() 1004 static int iopt_area_split(struct iopt_area *area, unsigned long iova) in iopt_area_split()
|
/openbmc/linux/drivers/gpu/drm/etnaviv/ |
H A D | etnaviv_mmu.c | 17 unsigned long iova, size_t size) in etnaviv_context_unmap() 40 unsigned long iova, phys_addr_t paddr, in etnaviv_context_map() 72 static int etnaviv_iommu_map(struct etnaviv_iommu_context *context, u32 iova, in etnaviv_iommu_map() 104 static void etnaviv_iommu_unmap(struct etnaviv_iommu_context *context, u32 iova, in etnaviv_iommu_unmap() 293 u32 iova; in etnaviv_iommu_map_gem() local
|