mirror of
https://github.com/joel16/android_kernel_sony_msm8994_rework.git
synced 2024-11-24 12:29:53 +00:00
VT-d: adapt domain iova_to_phys function for IOMMU API
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
This commit is contained in:
parent
dde57a210d
commit
d14d65777c
@ -3106,15 +3106,16 @@ int intel_iommu_found(void)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(intel_iommu_found);
|
||||
|
||||
u64 intel_iommu_iova_to_phys(struct dmar_domain *domain, u64 iova)
|
||||
static phys_addr_t intel_iommu_iova_to_phys(struct iommu_domain *domain,
|
||||
unsigned long iova)
|
||||
{
|
||||
struct dmar_domain *dmar_domain = domain->priv;
|
||||
struct dma_pte *pte;
|
||||
u64 phys = 0;
|
||||
|
||||
pte = addr_to_dma_pte(domain, iova);
|
||||
pte = addr_to_dma_pte(dmar_domain, iova);
|
||||
if (pte)
|
||||
phys = dma_pte_addr(pte);
|
||||
|
||||
return phys;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(intel_iommu_iova_to_phys);
|
||||
|
@ -330,8 +330,6 @@ extern int qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr,
|
||||
|
||||
extern void qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu);
|
||||
|
||||
u64 intel_iommu_iova_to_phys(struct dmar_domain *domain, u64 iova);
|
||||
|
||||
#ifdef CONFIG_DMAR
|
||||
int intel_iommu_found(void);
|
||||
#else /* CONFIG_DMAR */
|
||||
|
Loading…
Reference in New Issue
Block a user