]> git.baikalelectronics.ru Git - kernel.git/commit
iommu: Streamline iommu_iova_to_phys()
authorRobin Murphy <robin.murphy@arm.com>
Thu, 15 Jul 2021 13:04:24 +0000 (14:04 +0100)
committerJoerg Roedel <jroedel@suse.de>
Mon, 26 Jul 2021 11:37:51 +0000 (13:37 +0200)
commitc168e688a583b3b64b525b9ed8a79cc252a09825
treecae3b29ab61b41092d5d06a1981ded9156c39914
parent01ca72fbfb0fb10cd7146d3eba56ac39530005b2
iommu: Streamline iommu_iova_to_phys()

If people are going to insist on calling iommu_iova_to_phys()
pointlessly and expecting it to work, we can at least do ourselves a
favour by handling those cases in the core code, rather than repeatedly
across an inconsistent handful of drivers.

Since all the existing drivers implement the internal callback, and any
future ones are likely to want to work with iommu-dma which relies on
iova_to_phys a fair bit, we may as well remove that currently-redundant
check as well and consider it mandatory.

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/f564f3f6ff731b898ff7a898919bf871c2c7745a.1626354264.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/io_pgtable.c
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
drivers/iommu/arm/arm-smmu/arm-smmu.c
drivers/iommu/iommu.c