iommu/exynos: Don't unconditionally steal bus ops
authorRobin Murphy <robin.murphy@arm.com>
Tue, 9 Jan 2018 15:34:07 +0000 (15:34 +0000)
committerJoerg Roedel <jroedel@suse.de>
Wed, 17 Jan 2018 13:38:31 +0000 (14:38 +0100)
commitdc98b8480d8a68c2ce9aa28b9f0d714fd258bc0b
tree5e537c1ac07085c14b2843113e2a1f2448b12724
parenta8750ddca918032d6349adbf9a4b6555e7db20da
iommu/exynos: Don't unconditionally steal bus ops

Removing the early device registration hook overlooked the fact that
it only ran conditionally on a compatible device being present in the
DT. With exynos_iommu_init() now running as an unconditional initcall,
problems arise on non-Exynos systems when other IOMMU drivers find
themselves unable to install their ops on the platform bus, or at worst
the Exynos ops get called with someone else's domain and all hell breaks
loose.

The global ops/cache setup could probably all now be triggered from the
first IOMMU probe, as with dma_dev assigment, but for the time being the
simplest fix is to resurrect the logic from commit a7b67cd5d9af
("iommu/exynos: Play nice in multi-platform builds") to explicitly check
the DT for the presence of an Exynos IOMMU before trying anything.

Fixes: 928055a01b3f ("iommu/exynos: Remove custom platform device registration code")
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/exynos-iommu.c