Skip to content

Commit

Permalink
VT-d: adapt domain iova_to_phys function for IOMMU API
Browse files Browse the repository at this point in the history
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
  • Loading branch information
Joerg Roedel committed Jan 3, 2009
1 parent dde57a2 commit d14d657
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 4 additions & 3 deletions drivers/pci/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
2 changes: 0 additions & 2 deletions include/linux/intel-iommu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit d14d657

Please sign in to comment.