Lines Matching refs:iopgd

498 static u32 *iopte_alloc(struct iommu *obj, u32 *iopgd, u32 da)  in iopte_alloc()  argument
503 if (*iopgd) in iopte_alloc()
513 if (!*iopgd) { in iopte_alloc()
517 *iopgd = virt_to_phys(iopte) | IOPGD_TABLE; in iopte_alloc()
518 flush_iopgd_range(iopgd, iopgd); in iopte_alloc()
527 iopte = iopte_offset(iopgd, da); in iopte_alloc()
531 __func__, da, iopgd, *iopgd, iopte, *iopte); in iopte_alloc()
538 u32 *iopgd = iopgd_offset(obj, da); in iopgd_alloc_section() local
546 *iopgd = (pa & IOSECTION_MASK) | prot | IOPGD_SECTION; in iopgd_alloc_section()
547 flush_iopgd_range(iopgd, iopgd); in iopgd_alloc_section()
553 u32 *iopgd = iopgd_offset(obj, da); in iopgd_alloc_super() local
563 *(iopgd + i) = (pa & IOSUPER_MASK) | prot | IOPGD_SUPER; in iopgd_alloc_super()
564 flush_iopgd_range(iopgd, iopgd + 15); in iopgd_alloc_super()
570 u32 *iopgd = iopgd_offset(obj, da); in iopte_alloc_page() local
571 u32 *iopte = iopte_alloc(obj, iopgd, da); in iopte_alloc_page()
587 u32 *iopgd = iopgd_offset(obj, da); in iopte_alloc_large() local
588 u32 *iopte = iopte_alloc(obj, iopgd, da); in iopte_alloc_large()
671 u32 *iopgd, *iopte = NULL; in iopgtable_lookup_entry() local
673 iopgd = iopgd_offset(obj, da); in iopgtable_lookup_entry()
674 if (!*iopgd) in iopgtable_lookup_entry()
677 if (iopgd_is_table(*iopgd)) in iopgtable_lookup_entry()
678 iopte = iopte_offset(iopgd, da); in iopgtable_lookup_entry()
680 *ppgd = iopgd; in iopgtable_lookup_entry()
688 u32 *iopgd = iopgd_offset(obj, da); in iopgtable_clear_entry_core() local
691 if (!*iopgd) in iopgtable_clear_entry_core()
694 if (iopgd_is_table(*iopgd)) { in iopgtable_clear_entry_core()
696 u32 *iopte = iopte_offset(iopgd, da); in iopgtable_clear_entry_core()
702 iopte = iopte_offset(iopgd, (da & IOLARGE_MASK)); in iopgtable_clear_entry_core()
711 iopte = iopte_offset(iopgd, 0); in iopgtable_clear_entry_core()
720 if ((*iopgd & IOPGD_SUPER) == IOPGD_SUPER) { in iopgtable_clear_entry_core()
723 iopgd = iopgd_offset(obj, (da & IOSUPER_MASK)); in iopgtable_clear_entry_core()
727 memset(iopgd, 0, nent * sizeof(*iopgd)); in iopgtable_clear_entry_core()
728 flush_iopgd_range(iopgd, iopgd + (nent - 1) * sizeof(*iopgd)); in iopgtable_clear_entry_core()
761 u32 *iopgd; in iopgtable_clear_entry_all() local
764 iopgd = iopgd_offset(obj, da); in iopgtable_clear_entry_all()
766 if (!*iopgd) in iopgtable_clear_entry_all()
769 if (iopgd_is_table(*iopgd)) in iopgtable_clear_entry_all()
770 iopte_free(iopte_offset(iopgd, 0)); in iopgtable_clear_entry_all()
772 *iopgd = 0; in iopgtable_clear_entry_all()
773 flush_iopgd_range(iopgd, iopgd); in iopgtable_clear_entry_all()
787 u32 *iopgd, *iopte; in iommu_fault_handler() local
805 iopgd = iopgd_offset(obj, da); in iommu_fault_handler()
807 if (!iopgd_is_table(*iopgd)) { in iommu_fault_handler()
809 "*pgd:px%08x\n", obj->name, errs, da, iopgd, *iopgd); in iommu_fault_handler()
813 iopte = iopte_offset(iopgd, da); in iommu_fault_handler()
816 "pte:0x%p *pte:0x%08x\n", obj->name, errs, da, iopgd, *iopgd, in iommu_fault_handler()
1019 obj->iopgd = p; in omap_iommu_probe()
1021 BUG_ON(!IS_ALIGNED((unsigned long)obj->iopgd, IOPGD_TABLE_SIZE)); in omap_iommu_probe()
1048 free_pages((unsigned long)obj->iopgd, get_order(IOPGD_TABLE_SIZE)); in omap_iommu_remove()