]> git.baikalelectronics.ru Git - kernel.git/commit
iommu: Introduce device_iommu_capable()
authorRobin Murphy <robin.murphy@arm.com>
Mon, 25 Apr 2022 12:42:02 +0000 (13:42 +0100)
committerJoerg Roedel <jroedel@suse.de>
Thu, 28 Apr 2022 08:30:25 +0000 (10:30 +0200)
commit14868beb0f57d57dc78e47bae08311e78fe10fa3
treefbf6b85e5f30de228ecf43abeea69ce86881b8e5
parentdf2fe0631e260726bf77a63332a97062064d8521
iommu: Introduce device_iommu_capable()

iommu_capable() only really works for systems where all IOMMU instances
are completely homogeneous, and all devices are IOMMU-mapped. Implement
the new variant which will be able to give a more accurate answer for
whichever device the caller is actually interested in, and even more so
once all the external users have been converted and we can reliably pass
the device pointer through the internal driver interface too.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/8407eb9586677995b7a9fd70d0fd82d85929a9bb.1650878781.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c
include/linux/iommu.h