]> xenbits.xensource.com Git - xen.git/commit
xen/arm: boot with device trees with "mmu-masters" and "iommus"
authorStefano Stabellini <sstabellini@kernel.org>
Mon, 30 Sep 2019 20:56:18 +0000 (13:56 -0700)
committerStefano Stabellini <sstabellini@kernel.org>
Fri, 4 Oct 2019 17:14:00 +0000 (10:14 -0700)
commitcf4af9d6d6c9116578067d94e06ad2872531380a
tree357a6083db6782bbd5cf03e0d46d3b4bc540af65
parent15e9e36ddd510586f054fc2234b08d22ebc407bd
xen/arm: boot with device trees with "mmu-masters" and "iommus"

Some Device Trees may expose both legacy SMMU and generic IOMMU bindings
together. However, the SMMU driver in Xen is only supporting the legacy
SMMU bindings, leading to fatal initialization errors at boot time.

This patch fixes the booting problem by adding a check to
iommu_add_dt_device: if the Xen driver doesn't support the new generic
bindings, and the device is behind an IOMMU, do not return error. The
following iommu_assign_dt_device should succeed.

This check will become superfluous, hence removable, once the Xen SMMU
driver gets support for the generic IOMMU bindings.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/drivers/passthrough/device_tree.c