Lines Matching full:dte
98 phys_addr_t (*pt_address)(u32 dte);
160 * | DTE | -> +-----+
174 * Each DTE has a PT address and a valid bit:
185 static inline phys_addr_t rk_dte_pt_address(u32 dte) in rk_dte_pt_address() argument
187 return (phys_addr_t)dte & RK_DTE_PT_ADDRESS_MASK; in rk_dte_pt_address()
206 static inline phys_addr_t rk_dte_pt_address_v2(u32 dte) in rk_dte_pt_address_v2() argument
208 u64 dte_v2 = dte; in rk_dte_pt_address_v2()
217 static inline bool rk_dte_is_pt_valid(u32 dte) in rk_dte_is_pt_valid() argument
219 return dte & RK_DTE_PT_VALID; in rk_dte_is_pt_valid()
307 * | DTE index | PTE index | Page offset |
309 * 31:22 - DTE index - index of DTE in DT
310 * 21:12 - PTE index - index of PTE in PT @ DTE.pt_address
540 u32 dte; in log_iova() local
556 dte = *dte_addr; in log_iova()
558 if (!rk_dte_is_pt_valid(dte)) in log_iova()
561 pte_addr_phys = rk_ops->pt_address(dte) + (pte_index * 4); in log_iova()
574 …dev_err(iommu->dev, "mmu_dte_addr: %pa dte@%pa: %#08x valid: %u pte@%pa: %#08x valid: %u page@%pa … in log_iova()
575 &mmu_dte_addr_phys, &dte_addr_phys, dte, in log_iova()
576 rk_dte_is_pt_valid(dte), &pte_addr_phys, pte, in log_iova()
655 u32 dte, pte; in rk_iommu_iova_to_phys() local
660 dte = rk_domain->dt[rk_iova_dte_index(iova)]; in rk_iommu_iova_to_phys()
661 if (!rk_dte_is_pt_valid(dte)) in rk_iommu_iova_to_phys()
664 pt_phys = rk_ops->pt_address(dte); in rk_iommu_iova_to_phys()
719 u32 dte_index, dte; in rk_dte_get_page_table() local
727 dte = *dte_addr; in rk_dte_get_page_table()
728 if (rk_dte_is_pt_valid(dte)) in rk_dte_get_page_table()
742 dte = rk_ops->mk_dtentries(pt_dma); in rk_dte_get_page_table()
743 *dte_addr = dte; in rk_dte_get_page_table()
748 pt_phys = rk_ops->pt_address(dte); in rk_dte_get_page_table()
799 * mapped cachelines holding stale values for its dte and pte. in rk_iommu_map_iova()
801 * dte or pte shared with an existing mapping. in rk_iommu_map_iova()
836 * aligned, we will always only be mapping from a single dte here. in rk_iommu_map()
864 u32 dte; in rk_iommu_unmap() local
875 * aligned, we will always only be unmapping from a single dte here. in rk_iommu_unmap()
877 dte = rk_domain->dt[rk_iova_dte_index(iova)]; in rk_iommu_unmap()
879 if (!rk_dte_is_pt_valid(dte)) { in rk_iommu_unmap()
884 pt_phys = rk_ops->pt_address(dte); in rk_iommu_unmap()
1117 u32 dte = rk_domain->dt[i]; in rk_iommu_domain_free() local
1118 if (rk_dte_is_pt_valid(dte)) { in rk_iommu_domain_free()
1119 phys_addr_t pt_phys = rk_ops->pt_address(dte); in rk_iommu_domain_free()