]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
iommu: of: Handle IOMMU lookup failure with deferred probing or error
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 14 May 2015 23:00:09 +0000 (02:00 +0300)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Aug 2017 10:51:17 +0000 (12:51 +0200)
commit586e584f666867af1767c7fce579cd0945c16165
tree4aa51b97ea6147f765b1e5a4b26a2ca87a177852
parentf9015cc9c3ef16b6d6bf8604fabf47b8ca9e9c16
iommu: of: Handle IOMMU lookup failure with deferred probing or error

Failures to look up an IOMMU when parsing the DT iommus property need to
be handled separately from the .of_xlate() failures to support deferred
probing.

The lack of a registered IOMMU can be caused by the lack of a driver for
the IOMMU, the IOMMU device probe not having been performed yet, having
been deferred, or having failed.

The first case occurs when the device tree describes the bus master and
IOMMU topology correctly but no device driver exists for the IOMMU yet
or the device driver has not been compiled in. Return NULL, the caller
will configure the device without an IOMMU.

The second and third cases are handled by deferring the probe of the bus
master device which will eventually get reprobed after the IOMMU.

The last case is currently handled by deferring the probe of the bus
master device as well. A mechanism to either configure the bus master
device without an IOMMU or to fail the bus master device probe depending
on whether the IOMMU is optional or mandatory would be a good
enhancement.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/iommu/of_iommu.c
drivers/of/device.c