iommu/dma: Make limit checks self-contained
authorRobin Murphy <robin.murphy@arm.com>
Fri, 19 Apr 2024 16:54:44 +0000 (17:54 +0100)
committerJoerg Roedel <jroedel@suse.de>
Fri, 26 Apr 2024 10:07:25 +0000 (12:07 +0200)
commitad4750b07d3462ce29a0c9b1e88b2a1f9795290e
tree4ce8f88739fa5df29a5e5a15e273c5c7366b5c6e
parentfece6530bf4b59b01a476a12851e07751e73d69f
iommu/dma: Make limit checks self-contained

It's now easy to retrieve the device's DMA limits if we want to check
them against the domain aperture, so do that ourselves instead of
relying on them being passed through the callchain.

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Tested-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/e28a114243d1e79eb3609aded034f8529521333f.1713523152.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/dma-iommu.c