Lines Matching refs:iopte
491 static void iopte_free(u32 *iopte) in iopte_free() argument
494 if (iopte) in iopte_free()
495 kmem_cache_free(iopte_cachep, iopte); in iopte_free()
500 u32 *iopte; in iopte_alloc() local
510 iopte = kmem_cache_zalloc(iopte_cachep, GFP_KERNEL); in iopte_alloc()
514 if (!iopte) in iopte_alloc()
517 *iopgd = virt_to_phys(iopte) | IOPGD_TABLE; in iopte_alloc()
520 dev_vdbg(obj->dev, "%s: a new pte:%p\n", __func__, iopte); in iopte_alloc()
523 iopte_free(iopte); in iopte_alloc()
527 iopte = iopte_offset(iopgd, da); in iopte_alloc()
531 __func__, da, iopgd, *iopgd, iopte, *iopte); in iopte_alloc()
533 return iopte; in iopte_alloc()
571 u32 *iopte = iopte_alloc(obj, iopgd, da); in iopte_alloc_page() local
573 if (IS_ERR(iopte)) in iopte_alloc_page()
574 return PTR_ERR(iopte); in iopte_alloc_page()
576 *iopte = (pa & IOPAGE_MASK) | prot | IOPTE_SMALL; in iopte_alloc_page()
577 flush_iopte_range(iopte, iopte); in iopte_alloc_page()
580 __func__, da, pa, iopte, *iopte); in iopte_alloc_page()
588 u32 *iopte = iopte_alloc(obj, iopgd, da); in iopte_alloc_large() local
597 if (IS_ERR(iopte)) in iopte_alloc_large()
598 return PTR_ERR(iopte); in iopte_alloc_large()
601 *(iopte + i) = (pa & IOLARGE_MASK) | prot | IOPTE_LARGE; in iopte_alloc_large()
602 flush_iopte_range(iopte, iopte + 15); in iopte_alloc_large()
671 u32 *iopgd, *iopte = NULL; in iopgtable_lookup_entry() local
678 iopte = iopte_offset(iopgd, da); in iopgtable_lookup_entry()
681 *ppte = iopte; in iopgtable_lookup_entry()
695 u32 *iopte = iopte_offset(iopgd, da); in iopgtable_clear_entry_core() local
698 if (*iopte & IOPTE_LARGE) { in iopgtable_clear_entry_core()
701 iopte = iopte_offset(iopgd, (da & IOLARGE_MASK)); in iopgtable_clear_entry_core()
704 memset(iopte, 0, nent * sizeof(*iopte)); in iopgtable_clear_entry_core()
705 flush_iopte_range(iopte, iopte + (nent - 1) * sizeof(*iopte)); in iopgtable_clear_entry_core()
710 iopte = iopte_offset(iopgd, 0); in iopgtable_clear_entry_core()
712 if (iopte[i]) in iopgtable_clear_entry_core()
715 iopte_free(iopte); in iopgtable_clear_entry_core()
785 u32 *iopgd, *iopte; in iommu_fault_handler() local
811 iopte = iopte_offset(iopgd, da); in iommu_fault_handler()
814 obj->name, errs, da, iopgd, *iopgd, iopte, *iopte); in iommu_fault_handler()
1016 static void iopte_cachep_ctor(void *iopte) in iopte_cachep_ctor() argument
1018 clean_dcache_area(iopte, IOPTE_TABLE_SIZE); in iopte_cachep_ctor()