]> git.baikalelectronics.ru Git - kernel.git/commit
iommu: Always register bus notifiers
authorRobin Murphy <robin.murphy@arm.com>
Mon, 15 Aug 2022 16:20:05 +0000 (17:20 +0100)
committerJoerg Roedel <jroedel@suse.de>
Wed, 7 Sep 2022 12:25:02 +0000 (14:25 +0200)
commit637d6841e62903d850f5c2e0b85ffa1848130f6a
tree38a19375c2acc04509d6b8c76104531c7d106c3d
parent73a7f5cb4edb464042651d6e0af820481b4020bb
iommu: Always register bus notifiers

The number of bus types that the IOMMU subsystem deals with is small and
manageable, so pull that list into core code as a first step towards
cleaning up all the boilerplate bus-awareness from drivers. Calling
iommu_probe_device() before bus->iommu_ops is set will simply return
-ENODEV and not break the notifier call chain, so there should be no
harm in proactively registering all our bus notifiers at init time.

Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Matthew Rosato <mjrosato@linux.ibm.com> # s390
Tested-by: Niklas Schnelle <schnelle@linux.ibm.com> # s390
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/7462347bf938bd6eedb629a3a318434f6516e712.1660572783.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c