diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2008-12-03 09:06:57 -0500 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-01-03 08:11:08 -0500 |
commit | d14d65777c2491dd5baf1e17f444b8f653f3cbb1 (patch) | |
tree | d2067ca36c019d6f7b7b25886d514ce23b68ea07 | |
parent | dde57a210dcdce85e2813bab8f88687761d9f6a6 (diff) |
VT-d: adapt domain iova_to_phys function for IOMMU API
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
-rw-r--r-- | drivers/pci/intel-iommu.c | 7 | ||||
-rw-r--r-- | include/linux/intel-iommu.h | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 8af6c96f31b..712810598a2 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
@@ -3106,15 +3106,16 @@ int intel_iommu_found(void) | |||
3106 | } | 3106 | } |
3107 | EXPORT_SYMBOL_GPL(intel_iommu_found); | 3107 | EXPORT_SYMBOL_GPL(intel_iommu_found); |
3108 | 3108 | ||
3109 | u64 intel_iommu_iova_to_phys(struct dmar_domain *domain, u64 iova) | 3109 | static phys_addr_t intel_iommu_iova_to_phys(struct iommu_domain *domain, |
3110 | unsigned long iova) | ||
3110 | { | 3111 | { |
3112 | struct dmar_domain *dmar_domain = domain->priv; | ||
3111 | struct dma_pte *pte; | 3113 | struct dma_pte *pte; |
3112 | u64 phys = 0; | 3114 | u64 phys = 0; |
3113 | 3115 | ||
3114 | pte = addr_to_dma_pte(domain, iova); | 3116 | pte = addr_to_dma_pte(dmar_domain, iova); |
3115 | if (pte) | 3117 | if (pte) |
3116 | phys = dma_pte_addr(pte); | 3118 | phys = dma_pte_addr(pte); |
3117 | 3119 | ||
3118 | return phys; | 3120 | return phys; |
3119 | } | 3121 | } |
3120 | EXPORT_SYMBOL_GPL(intel_iommu_iova_to_phys); | ||
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index 6bc26e03858..26ccc029456 100644 --- a/include/linux/intel-iommu.h +++ b/include/linux/intel-iommu.h | |||
@@ -330,8 +330,6 @@ extern int qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr, | |||
330 | 330 | ||
331 | extern void qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu); | 331 | extern void qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu); |
332 | 332 | ||
333 | u64 intel_iommu_iova_to_phys(struct dmar_domain *domain, u64 iova); | ||
334 | |||
335 | #ifdef CONFIG_DMAR | 333 | #ifdef CONFIG_DMAR |
336 | int intel_iommu_found(void); | 334 | int intel_iommu_found(void); |
337 | #else /* CONFIG_DMAR */ | 335 | #else /* CONFIG_DMAR */ |