Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iommu/fsl: Make iova dma_addr_t in the iommu_iova_to_phys API.

This is required in case of PAMU, as it can support a window size of up
to 64G (even on 32bit).

Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>

authored by

Varun Sethi and committed by
Joerg Roedel
bb5547ac 07961ac7

+12 -16
+1 -1
drivers/iommu/amd_iommu.c
··· 3410 3410 } 3411 3411 3412 3412 static phys_addr_t amd_iommu_iova_to_phys(struct iommu_domain *dom, 3413 - unsigned long iova) 3413 + dma_addr_t iova) 3414 3414 { 3415 3415 struct protection_domain *domain = dom->priv; 3416 3416 unsigned long offset_mask;
+1 -1
drivers/iommu/exynos-iommu.c
··· 1027 1027 } 1028 1028 1029 1029 static phys_addr_t exynos_iommu_iova_to_phys(struct iommu_domain *domain, 1030 - unsigned long iova) 1030 + dma_addr_t iova) 1031 1031 { 1032 1032 struct exynos_iommu_domain *priv = domain->priv; 1033 1033 unsigned long *entry;
+1 -1
drivers/iommu/intel-iommu.c
··· 4111 4111 } 4112 4112 4113 4113 static phys_addr_t intel_iommu_iova_to_phys(struct iommu_domain *domain, 4114 - unsigned long iova) 4114 + dma_addr_t iova) 4115 4115 { 4116 4116 struct dmar_domain *dmar_domain = domain->priv; 4117 4117 struct dma_pte *pte;
+1 -2
drivers/iommu/iommu.c
··· 706 706 } 707 707 EXPORT_SYMBOL_GPL(iommu_detach_group); 708 708 709 - phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, 710 - unsigned long iova) 709 + phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova) 711 710 { 712 711 if (unlikely(domain->ops->iova_to_phys == NULL)) 713 712 return 0;
+1 -1
drivers/iommu/msm_iommu.c
··· 554 554 } 555 555 556 556 static phys_addr_t msm_iommu_iova_to_phys(struct iommu_domain *domain, 557 - unsigned long va) 557 + dma_addr_t va) 558 558 { 559 559 struct msm_priv *priv; 560 560 struct msm_iommu_drvdata *iommu_drvdata;
+1 -1
drivers/iommu/omap-iommu.c
··· 1219 1219 } 1220 1220 1221 1221 static phys_addr_t omap_iommu_iova_to_phys(struct iommu_domain *domain, 1222 - unsigned long da) 1222 + dma_addr_t da) 1223 1223 { 1224 1224 struct omap_iommu_domain *omap_domain = domain->priv; 1225 1225 struct omap_iommu *oiommu = omap_domain->iommu_dev;
+1 -1
drivers/iommu/shmobile-iommu.c
··· 296 296 } 297 297 298 298 static phys_addr_t shmobile_iommu_iova_to_phys(struct iommu_domain *domain, 299 - unsigned long iova) 299 + dma_addr_t iova) 300 300 { 301 301 struct shmobile_iommu_domain *sh_domain = domain->priv; 302 302 uint32_t l1entry = 0, l2entry = 0;
+1 -1
drivers/iommu/tegra-gart.c
··· 279 279 } 280 280 281 281 static phys_addr_t gart_iommu_iova_to_phys(struct iommu_domain *domain, 282 - unsigned long iova) 282 + dma_addr_t iova) 283 283 { 284 284 struct gart_device *gart = domain->priv; 285 285 unsigned long pte;
+1 -1
drivers/iommu/tegra-smmu.c
··· 757 757 } 758 758 759 759 static phys_addr_t smmu_iommu_iova_to_phys(struct iommu_domain *domain, 760 - unsigned long iova) 760 + dma_addr_t iova) 761 761 { 762 762 struct smmu_as *as = domain->priv; 763 763 unsigned long *pte;
+3 -6
include/linux/iommu.h
··· 91 91 phys_addr_t paddr, size_t size, int prot); 92 92 size_t (*unmap)(struct iommu_domain *domain, unsigned long iova, 93 93 size_t size); 94 - phys_addr_t (*iova_to_phys)(struct iommu_domain *domain, 95 - unsigned long iova); 94 + phys_addr_t (*iova_to_phys)(struct iommu_domain *domain, dma_addr_t iova); 96 95 int (*domain_has_cap)(struct iommu_domain *domain, 97 96 unsigned long cap); 98 97 int (*add_device)(struct device *dev); ··· 133 134 phys_addr_t paddr, size_t size, int prot); 134 135 extern size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova, 135 136 size_t size); 136 - extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, 137 - unsigned long iova); 137 + extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova); 138 138 extern int iommu_domain_has_cap(struct iommu_domain *domain, 139 139 unsigned long cap); 140 140 extern void iommu_set_fault_handler(struct iommu_domain *domain, ··· 265 267 { 266 268 } 267 269 268 - static inline phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, 269 - unsigned long iova) 270 + static inline phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova) 270 271 { 271 272 return 0; 272 273 }