VT-d: adapt domain iova_to_phys function for IOMMU API

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>

+4 -5
+4 -3
drivers/pci/intel-iommu.c
··· 3106 } 3107 EXPORT_SYMBOL_GPL(intel_iommu_found); 3108 3109 - u64 intel_iommu_iova_to_phys(struct dmar_domain *domain, u64 iova) 3110 { 3111 struct dma_pte *pte; 3112 u64 phys = 0; 3113 3114 - pte = addr_to_dma_pte(domain, iova); 3115 if (pte) 3116 phys = dma_pte_addr(pte); 3117 3118 return phys; 3119 } 3120 - EXPORT_SYMBOL_GPL(intel_iommu_iova_to_phys);
··· 3106 } 3107 EXPORT_SYMBOL_GPL(intel_iommu_found); 3108 3109 + static phys_addr_t intel_iommu_iova_to_phys(struct iommu_domain *domain, 3110 + unsigned long iova) 3111 { 3112 + struct dmar_domain *dmar_domain = domain->priv; 3113 struct dma_pte *pte; 3114 u64 phys = 0; 3115 3116 + pte = addr_to_dma_pte(dmar_domain, iova); 3117 if (pte) 3118 phys = dma_pte_addr(pte); 3119 3120 return phys; 3121 }
-2
include/linux/intel-iommu.h
··· 330 331 extern void qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu); 332 333 - u64 intel_iommu_iova_to_phys(struct dmar_domain *domain, u64 iova); 334 - 335 #ifdef CONFIG_DMAR 336 int intel_iommu_found(void); 337 #else /* CONFIG_DMAR */
··· 330 331 extern void qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu); 332 333 #ifdef CONFIG_DMAR 334 int intel_iommu_found(void); 335 #else /* CONFIG_DMAR */