diff options
author | Sunil Goutham <sgoutham@cavium.com> | 2017-04-25 12:57:52 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2017-04-26 13:30:10 +0300 |
commit | bdf95923086fb359ccb44c815724c3ace1611c90 (patch) | |
tree | cc463fbb7747b233592ab2ec51aa8606a8f41b99 /drivers/iommu/arm-smmu.c | |
parent | 6323f474902e372623d73486c1ad30eb40d6604f (diff) | |
download | linux-bdf95923086fb359ccb44c815724c3ace1611c90.tar.xz |
iommu/arm-smmu: Return IOVA in iova_to_phys when SMMU is bypassed
For software initiated address translation, when domain type is
IOMMU_DOMAIN_IDENTITY i.e SMMU is bypassed, mimic HW behavior
i.e return the same IOVA as translated address.
This patch is an extension to Will Deacon's patchset
"Implement SMMU passthrough using the default domain".
Signed-off-by: Sunil Goutham <sgoutham@cavium.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/arm-smmu.c')
-rw-r--r-- | drivers/iommu/arm-smmu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 77242afa1efc..a36e80abf084 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -1459,6 +1459,9 @@ static phys_addr_t arm_smmu_iova_to_phys(struct iommu_domain *domain, struct arm_smmu_domain *smmu_domain = to_smmu_domain(domain); struct io_pgtable_ops *ops= smmu_domain->pgtbl_ops; + if (domain->type == IOMMU_DOMAIN_IDENTITY) + return iova; + if (!ops) return 0; |