Lines Matching refs:pgtable

27 	uint32_t *pgtable;  member
56 static int pgtable_alloc(struct shmobile_iommu_domain_pgtable *pgtable, in pgtable_alloc() argument
59 pgtable->pgtable = kmem_cache_zalloc(cache, GFP_ATOMIC); in pgtable_alloc()
60 if (!pgtable->pgtable) in pgtable_alloc()
62 pgtable->handle = dma_map_single(NULL, pgtable->pgtable, size, in pgtable_alloc()
67 static void pgtable_free(struct shmobile_iommu_domain_pgtable *pgtable, in pgtable_free() argument
70 dma_unmap_single(NULL, pgtable->handle, size, DMA_TO_DEVICE); in pgtable_free()
71 kmem_cache_free(cache, pgtable->pgtable); in pgtable_free()
74 static uint32_t pgtable_read(struct shmobile_iommu_domain_pgtable *pgtable, in pgtable_read() argument
77 return pgtable->pgtable[index]; in pgtable_read()
80 static void pgtable_write(struct shmobile_iommu_domain_pgtable *pgtable, in pgtable_write() argument
86 pgtable->pgtable[index + i] = val; in pgtable_write()
87 dma_sync_single_for_device(NULL, pgtable->handle + index * sizeof(val), in pgtable_write()
108 sh_domain->l2[i].pgtable = NULL; in shmobile_iommu_domain_alloc()
121 if (sh_domain->l2[i].pgtable) in shmobile_iommu_domain_free()
193 if (!sh_domain->l2[l1index].pgtable) { in l2alloc()
205 if (l2->pgtable) in l2realfree()
214 if (sh_domain->l2[l1index].pgtable) { in l2free()
216 sh_domain->l2[l1index].pgtable = NULL; in l2free()
223 struct shmobile_iommu_domain_pgtable l2 = { .pgtable = NULL }; in shmobile_iommu_map()
267 struct shmobile_iommu_domain_pgtable l2 = { .pgtable = NULL }; in shmobile_iommu_unmap()
283 if (sh_domain->l2[l1index].pgtable) in shmobile_iommu_unmap()
315 if (sh_domain->l2[l1index].pgtable) in shmobile_iommu_iova_to_phys()