Messages in this thread | | | Date | Thu, 9 Mar 2023 21:00:31 -0400 | From | Jason Gunthorpe <> | Subject | Re: [PATCH v3 1/6] ARM/dma-mapping: Add arm_iommu_release_device() |
| |
On Mon, Mar 06, 2023 at 10:57:59AM +0800, Lu Baolu wrote: > It is like arm_iommu_detach_device() except it handles the special case > of being called under an iommu driver's release operation. In this case > the driver must have already detached the device from any attached > domain before calling this function. > > Replace arm_iommu_detach_device() with arm_iommu_release_device() in the > release path of the ipmmu-vmsa driver. > > The bonus is that it also removes a obstacle of arm_iommu_detach_device() > re-entering the iommu core during release_device. With this removed, the > iommu core code could be simplified a lot. > > Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> > Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> > --- > arch/arm/include/asm/dma-iommu.h | 1 + > arch/arm/mm/dma-mapping.c | 25 +++++++++++++++++++++++++ > drivers/iommu/ipmmu-vmsa.c | 15 +++++++++++++-- > 3 files changed, 39 insertions(+), 2 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Jason
| |