Lines Matching refs:iopte

469 static void iopte_free(struct omap_iommu *obj, u32 *iopte, bool dma_valid)  in iopte_free()  argument
474 if (iopte) { in iopte_free()
476 pt_dma = virt_to_phys(iopte); in iopte_free()
481 kmem_cache_free(iopte_cachep, iopte); in iopte_free()
488 u32 *iopte; in iopte_alloc() local
499 iopte = kmem_cache_zalloc(iopte_cachep, GFP_KERNEL); in iopte_alloc()
503 if (!iopte) in iopte_alloc()
506 *pt_dma = dma_map_single(obj->dev, iopte, IOPTE_TABLE_SIZE, in iopte_alloc()
510 iopte_free(obj, iopte, false); in iopte_alloc()
518 if (WARN_ON(*pt_dma != virt_to_phys(iopte))) { in iopte_alloc()
522 iopte_free(obj, iopte, false); in iopte_alloc()
526 *iopgd = virt_to_phys(iopte) | IOPGD_TABLE; in iopte_alloc()
529 dev_vdbg(obj->dev, "%s: a new pte:%p\n", __func__, iopte); in iopte_alloc()
532 iopte_free(obj, iopte, false); in iopte_alloc()
536 iopte = iopte_offset(iopgd, da); in iopte_alloc()
540 __func__, da, iopgd, *iopgd, iopte, *iopte); in iopte_alloc()
542 return iopte; in iopte_alloc()
583 u32 *iopte = iopte_alloc(obj, iopgd, &pt_dma, da); in iopte_alloc_page() local
586 if (IS_ERR(iopte)) in iopte_alloc_page()
587 return PTR_ERR(iopte); in iopte_alloc_page()
589 *iopte = (pa & IOPAGE_MASK) | prot | IOPTE_SMALL; in iopte_alloc_page()
593 __func__, da, pa, iopte, *iopte); in iopte_alloc_page()
602 u32 *iopte = iopte_alloc(obj, iopgd, &pt_dma, da); in iopte_alloc_large() local
612 if (IS_ERR(iopte)) in iopte_alloc_large()
613 return PTR_ERR(iopte); in iopte_alloc_large()
616 *(iopte + i) = (pa & IOLARGE_MASK) | prot | IOPTE_LARGE; in iopte_alloc_large()
688 u32 *iopgd, *iopte = NULL; in iopgtable_lookup_entry() local
695 iopte = iopte_offset(iopgd, da); in iopgtable_lookup_entry()
698 *ppte = iopte; in iopgtable_lookup_entry()
715 u32 *iopte = iopte_offset(iopgd, da); in iopgtable_clear_entry_core() local
718 if (*iopte & IOPTE_LARGE) { in iopgtable_clear_entry_core()
721 iopte = iopte_offset(iopgd, (da & IOLARGE_MASK)); in iopgtable_clear_entry_core()
724 memset(iopte, 0, nent * sizeof(*iopte)); in iopgtable_clear_entry_core()
731 iopte = iopte_offset(iopgd, 0); in iopgtable_clear_entry_core()
733 if (iopte[i]) in iopgtable_clear_entry_core()
736 iopte_free(obj, iopte, true); in iopgtable_clear_entry_core()
808 u32 *iopgd, *iopte; in iommu_fault_handler() local
834 iopte = iopte_offset(iopgd, da); in iommu_fault_handler()
837 obj->name, errs, da, iopgd, *iopgd, iopte, *iopte); in iommu_fault_handler()