]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iommu: Ensure .iotlb_sync is called correctly
authorRobin Murphy <robin.murphy@arm.com>
Wed, 8 Apr 2026 14:40:57 +0000 (15:40 +0100)
committerWill Deacon <will@kernel.org>
Thu, 9 Apr 2026 12:07:13 +0000 (13:07 +0100)
commit7e0548525abd2bff9694e016b6a469ccd2d5a053
tree10df7b6c91436d9b3a155c1c2a4935b77adae14f
parent8b72aa5704c77380742346d4ac755b074b7f9eaa
iommu: Ensure .iotlb_sync is called correctly

Many drivers have no reason to use the iotlb_gather mechanism, but do
still depend on .iotlb_sync being called to properly complete an unmap.
Since the core code is now relying on the gather to detect when there
is legitimately something to sync, it should also take care of encoding
a successful unmap when the driver does not touch the gather itself.

Fixes: 90c5def10bea ("iommu: Do not call drivers for empty gathers")
Reported-by: Jon Hunter <jonathanh@nvidia.com>
Closes: https://lore.kernel.org/r/8800a38b-8515-4bbe-af15-0dae81274bf7@nvidia.com
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Tested-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/iommu.c