Lines Matching refs:pgtable
194 static u64 *fetch_pte(struct amd_io_pgtable *pgtable, in fetch_pte() argument
201 pte = &pgtable->pgd[PM_LEVEL_INDEX(level, iova)]; in fetch_pte()
236 struct amd_io_pgtable *pgtable = io_pgtable_ops_to_data(ops); in iommu_v2_map_pages() local
237 struct io_pgtable_cfg *cfg = &pgtable->pgtbl.cfg; in iommu_v2_map_pages()
254 pte = v2_alloc_pte(cfg->amd.nid, pgtable->pgd, in iommu_v2_map_pages()
286 struct amd_io_pgtable *pgtable = io_pgtable_ops_to_data(ops); in iommu_v2_unmap_pages() local
287 struct io_pgtable_cfg *cfg = &pgtable->pgtbl.cfg; in iommu_v2_unmap_pages()
297 pte = fetch_pte(pgtable, iova, &unmap_size); in iommu_v2_unmap_pages()
312 struct amd_io_pgtable *pgtable = io_pgtable_ops_to_data(ops); in iommu_v2_iova_to_phys() local
316 pte = fetch_pte(pgtable, iova, &pte_pgsize); in iommu_v2_iova_to_phys()
331 struct amd_io_pgtable *pgtable = container_of(iop, struct amd_io_pgtable, pgtbl); in v2_free_pgtable() local
333 if (!pgtable || !pgtable->pgd) in v2_free_pgtable()
337 free_pgtable(pgtable->pgd, get_pgtable_level()); in v2_free_pgtable()
338 pgtable->pgd = NULL; in v2_free_pgtable()
343 struct amd_io_pgtable *pgtable = io_pgtable_cfg_to_data(cfg); in v2_alloc_pgtable() local
346 pgtable->pgd = iommu_alloc_page_node(cfg->amd.nid, GFP_KERNEL); in v2_alloc_pgtable()
347 if (!pgtable->pgd) in v2_alloc_pgtable()
353 pgtable->pgtbl.ops.map_pages = iommu_v2_map_pages; in v2_alloc_pgtable()
354 pgtable->pgtbl.ops.unmap_pages = iommu_v2_unmap_pages; in v2_alloc_pgtable()
355 pgtable->pgtbl.ops.iova_to_phys = iommu_v2_iova_to_phys; in v2_alloc_pgtable()
361 return &pgtable->pgtbl; in v2_alloc_pgtable()