diff options
author | Varun Sethi <Varun.Sethi@freescale.com> | 2013-03-28 15:53:58 -0400 |
---|---|---|
committer | Joerg Roedel <joro@8bytes.org> | 2013-04-02 12:20:53 -0400 |
commit | bb5547acfcd842950b8a22aa83f84af93388b9f2 (patch) | |
tree | 6b44ae74b7c3cd0dee3f0f6a5b1597007c1e3a0d | |
parent | 07961ac7c0ee8b546658717034fe692fd12eefa9 (diff) |
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>
-rw-r--r-- | drivers/iommu/amd_iommu.c | 2 | ||||
-rw-r--r-- | drivers/iommu/exynos-iommu.c | 2 | ||||
-rw-r--r-- | drivers/iommu/intel-iommu.c | 2 | ||||
-rw-r--r-- | drivers/iommu/iommu.c | 3 | ||||
-rw-r--r-- | drivers/iommu/msm_iommu.c | 2 | ||||
-rw-r--r-- | drivers/iommu/omap-iommu.c | 2 | ||||
-rw-r--r-- | drivers/iommu/shmobile-iommu.c | 2 | ||||
-rw-r--r-- | drivers/iommu/tegra-gart.c | 2 | ||||
-rw-r--r-- | drivers/iommu/tegra-smmu.c | 2 | ||||
-rw-r--r-- | include/linux/iommu.h | 9 |
10 files changed, 12 insertions, 16 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index b287ca33833d..a7f6b04eaa5e 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c | |||
@@ -3410,7 +3410,7 @@ static size_t amd_iommu_unmap(struct iommu_domain *dom, unsigned long iova, | |||
3410 | } | 3410 | } |
3411 | 3411 | ||
3412 | static phys_addr_t amd_iommu_iova_to_phys(struct iommu_domain *dom, | 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 | struct protection_domain *domain = dom->priv; | 3415 | struct protection_domain *domain = dom->priv; |
3416 | unsigned long offset_mask; | 3416 | unsigned long offset_mask; |
diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index 238a3caa949a..3f32d64ab87a 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c | |||
@@ -1027,7 +1027,7 @@ done: | |||
1027 | } | 1027 | } |
1028 | 1028 | ||
1029 | static phys_addr_t exynos_iommu_iova_to_phys(struct iommu_domain *domain, | 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 | struct exynos_iommu_domain *priv = domain->priv; | 1032 | struct exynos_iommu_domain *priv = domain->priv; |
1033 | unsigned long *entry; | 1033 | unsigned long *entry; |
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 0099667a397e..6e0b9ffc79b5 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c | |||
@@ -4111,7 +4111,7 @@ static size_t intel_iommu_unmap(struct iommu_domain *domain, | |||
4111 | } | 4111 | } |
4112 | 4112 | ||
4113 | static phys_addr_t intel_iommu_iova_to_phys(struct iommu_domain *domain, | 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 | struct dmar_domain *dmar_domain = domain->priv; | 4116 | struct dmar_domain *dmar_domain = domain->priv; |
4117 | struct dma_pte *pte; | 4117 | struct dma_pte *pte; |
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index b972d430d92b..f730ed9d8af9 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c | |||
@@ -706,8 +706,7 @@ void iommu_detach_group(struct iommu_domain *domain, struct iommu_group *group) | |||
706 | } | 706 | } |
707 | EXPORT_SYMBOL_GPL(iommu_detach_group); | 707 | EXPORT_SYMBOL_GPL(iommu_detach_group); |
708 | 708 | ||
709 | phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, | 709 | phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova) |
710 | unsigned long iova) | ||
711 | { | 710 | { |
712 | if (unlikely(domain->ops->iova_to_phys == NULL)) | 711 | if (unlikely(domain->ops->iova_to_phys == NULL)) |
713 | return 0; | 712 | return 0; |
diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c index 6a8870a31668..8ab4f41090af 100644 --- a/drivers/iommu/msm_iommu.c +++ b/drivers/iommu/msm_iommu.c | |||
@@ -554,7 +554,7 @@ fail: | |||
554 | } | 554 | } |
555 | 555 | ||
556 | static phys_addr_t msm_iommu_iova_to_phys(struct iommu_domain *domain, | 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 | struct msm_priv *priv; | 559 | struct msm_priv *priv; |
560 | struct msm_iommu_drvdata *iommu_drvdata; | 560 | struct msm_iommu_drvdata *iommu_drvdata; |
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index 6ac02fa5910f..e02e5d71745b 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c | |||
@@ -1219,7 +1219,7 @@ static void omap_iommu_domain_destroy(struct iommu_domain *domain) | |||
1219 | } | 1219 | } |
1220 | 1220 | ||
1221 | static phys_addr_t omap_iommu_iova_to_phys(struct iommu_domain *domain, | 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 | struct omap_iommu_domain *omap_domain = domain->priv; | 1224 | struct omap_iommu_domain *omap_domain = domain->priv; |
1225 | struct omap_iommu *oiommu = omap_domain->iommu_dev; | 1225 | struct omap_iommu *oiommu = omap_domain->iommu_dev; |
diff --git a/drivers/iommu/shmobile-iommu.c b/drivers/iommu/shmobile-iommu.c index b6e8b57cf0a8..d572863dfccd 100644 --- a/drivers/iommu/shmobile-iommu.c +++ b/drivers/iommu/shmobile-iommu.c | |||
@@ -296,7 +296,7 @@ done: | |||
296 | } | 296 | } |
297 | 297 | ||
298 | static phys_addr_t shmobile_iommu_iova_to_phys(struct iommu_domain *domain, | 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 | struct shmobile_iommu_domain *sh_domain = domain->priv; | 301 | struct shmobile_iommu_domain *sh_domain = domain->priv; |
302 | uint32_t l1entry = 0, l2entry = 0; | 302 | uint32_t l1entry = 0, l2entry = 0; |
diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c index 86437575f94d..4aec8be38054 100644 --- a/drivers/iommu/tegra-gart.c +++ b/drivers/iommu/tegra-gart.c | |||
@@ -279,7 +279,7 @@ static size_t gart_iommu_unmap(struct iommu_domain *domain, unsigned long iova, | |||
279 | } | 279 | } |
280 | 280 | ||
281 | static phys_addr_t gart_iommu_iova_to_phys(struct iommu_domain *domain, | 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 | struct gart_device *gart = domain->priv; | 284 | struct gart_device *gart = domain->priv; |
285 | unsigned long pte; | 285 | unsigned long pte; |
diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c index b34e5fd7fd9e..bc9b59949d09 100644 --- a/drivers/iommu/tegra-smmu.c +++ b/drivers/iommu/tegra-smmu.c | |||
@@ -757,7 +757,7 @@ static size_t smmu_iommu_unmap(struct iommu_domain *domain, unsigned long iova, | |||
757 | } | 757 | } |
758 | 758 | ||
759 | static phys_addr_t smmu_iommu_iova_to_phys(struct iommu_domain *domain, | 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 | struct smmu_as *as = domain->priv; | 762 | struct smmu_as *as = domain->priv; |
763 | unsigned long *pte; | 763 | unsigned long *pte; |
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index ba3b8a98a049..bb0a0fc26729 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h | |||
@@ -91,8 +91,7 @@ struct iommu_ops { | |||
91 | phys_addr_t paddr, size_t size, int prot); | 91 | phys_addr_t paddr, size_t size, int prot); |
92 | size_t (*unmap)(struct iommu_domain *domain, unsigned long iova, | 92 | size_t (*unmap)(struct iommu_domain *domain, unsigned long iova, |
93 | size_t size); | 93 | size_t size); |
94 | phys_addr_t (*iova_to_phys)(struct iommu_domain *domain, | 94 | phys_addr_t (*iova_to_phys)(struct iommu_domain *domain, dma_addr_t iova); |
95 | unsigned long iova); | ||
96 | int (*domain_has_cap)(struct iommu_domain *domain, | 95 | int (*domain_has_cap)(struct iommu_domain *domain, |
97 | unsigned long cap); | 96 | unsigned long cap); |
98 | int (*add_device)(struct device *dev); | 97 | int (*add_device)(struct device *dev); |
@@ -134,8 +133,7 @@ extern int iommu_map(struct iommu_domain *domain, unsigned long iova, | |||
134 | phys_addr_t paddr, size_t size, int prot); | 133 | phys_addr_t paddr, size_t size, int prot); |
135 | extern size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova, | 134 | extern size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova, |
136 | size_t size); | 135 | size_t size); |
137 | extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, | 136 | extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova); |
138 | unsigned long iova); | ||
139 | extern int iommu_domain_has_cap(struct iommu_domain *domain, | 137 | extern int iommu_domain_has_cap(struct iommu_domain *domain, |
140 | unsigned long cap); | 138 | unsigned long cap); |
141 | extern void iommu_set_fault_handler(struct iommu_domain *domain, | 139 | extern void iommu_set_fault_handler(struct iommu_domain *domain, |
@@ -267,8 +265,7 @@ static inline void iommu_domain_window_disable(struct iommu_domain *domain, | |||
267 | { | 265 | { |
268 | } | 266 | } |
269 | 267 | ||
270 | static inline phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, | 268 | static inline phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain, dma_addr_t iova) |
271 | unsigned long iova) | ||
272 | { | 269 | { |
273 | return 0; | 270 | return 0; |
274 | } | 271 | } |