Lines Matching refs:iopte

617 static void iopte_free(u32 *iopte)  in iopte_free()  argument
620 if (iopte) in iopte_free()
621 kmem_cache_free(iopte_cachep, iopte); in iopte_free()
626 u32 *iopte; in iopte_alloc() local
636 iopte = kmem_cache_zalloc(iopte_cachep, GFP_KERNEL); in iopte_alloc()
640 if (!iopte) in iopte_alloc()
643 *iopgd = virt_to_phys(iopte) | IOPGD_TABLE; in iopte_alloc()
646 dev_vdbg(obj->dev, "%s: a new pte:%p\n", __func__, iopte); in iopte_alloc()
649 iopte_free(iopte); in iopte_alloc()
653 iopte = iopte_offset(iopgd, da); in iopte_alloc()
657 __func__, da, iopgd, *iopgd, iopte, *iopte); in iopte_alloc()
659 return iopte; in iopte_alloc()
697 u32 *iopte = iopte_alloc(obj, iopgd, da); in iopte_alloc_page() local
699 if (IS_ERR(iopte)) in iopte_alloc_page()
700 return PTR_ERR(iopte); in iopte_alloc_page()
702 *iopte = (pa & IOPAGE_MASK) | prot | IOPTE_SMALL; in iopte_alloc_page()
703 flush_iopte_range(iopte, iopte); in iopte_alloc_page()
706 __func__, da, pa, iopte, *iopte); in iopte_alloc_page()
714 u32 *iopte = iopte_alloc(obj, iopgd, da); in iopte_alloc_large() local
723 if (IS_ERR(iopte)) in iopte_alloc_large()
724 return PTR_ERR(iopte); in iopte_alloc_large()
727 *(iopte + i) = (pa & IOLARGE_MASK) | prot | IOPTE_LARGE; in iopte_alloc_large()
728 flush_iopte_range(iopte, iopte + 15); in iopte_alloc_large()
797 u32 *iopgd, *iopte = NULL; in iopgtable_lookup_entry() local
804 iopte = iopte_offset(iopgd, da); in iopgtable_lookup_entry()
807 *ppte = iopte; in iopgtable_lookup_entry()
821 u32 *iopte = iopte_offset(iopgd, da); in iopgtable_clear_entry_core() local
824 if (*iopte & IOPTE_LARGE) { in iopgtable_clear_entry_core()
827 iopte = iopte_offset(iopgd, (da & IOLARGE_MASK)); in iopgtable_clear_entry_core()
830 memset(iopte, 0, nent * sizeof(*iopte)); in iopgtable_clear_entry_core()
831 flush_iopte_range(iopte, iopte + (nent - 1) * sizeof(*iopte)); in iopgtable_clear_entry_core()
836 iopte = iopte_offset(iopgd, 0); in iopgtable_clear_entry_core()
838 if (iopte[i]) in iopgtable_clear_entry_core()
841 iopte_free(iopte); in iopgtable_clear_entry_core()
911 u32 *iopgd, *iopte; in iommu_fault_handler() local
937 iopte = iopte_offset(iopgd, da); in iommu_fault_handler()
940 obj->name, errs, da, iopgd, *iopgd, iopte, *iopte); in iommu_fault_handler()
1103 static void iopte_cachep_ctor(void *iopte) in iopte_cachep_ctor() argument
1105 clean_dcache_area(iopte, IOPTE_TABLE_SIZE); in iopte_cachep_ctor()