iommu/arm: Add ability to handle deferred probing request
authorOleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Thu, 26 Sep 2019 11:20:28 +0000 (14:20 +0300)
committerJulien Grall <julien.grall@arm.com>
Thu, 26 Sep 2019 13:31:04 +0000 (14:31 +0100)
commit805b77579a400e232bccb44b63203eaf4d8c0ad9
treecd62ea3b72d5a990e111b5d92e37ff8da5cd24f0
parent9001ad4d7c5f3ac2a1087794c3b8ab651dc324b3
iommu/arm: Add ability to handle deferred probing request

This patch adds minimal required support to General IOMMU framework
to be able to handle a case when IOMMU driver requesting deferred
probing for a device.

In order not to pull Linux's error code (-EPROBE_DEFER) to Xen
we have chosen -EAGAIN to be used for indicating that device
probing is deferred.

This is needed for the upcoming IPMMU driver which may request
deferred probing depending on what device will be probed the first
(there is some dependency between these devices, Root device must be
registered before Cache devices. If not the case, driver will deny
further Cache device probes until Root device is registered).
As we can't guarantee a fixed pre-defined order for the device nodes
in DT, we need to be ready for the situation where devices being
probed in "any" order.

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
xen/drivers/passthrough/arm/iommu.c
xen/include/asm-arm/device.h
xen/include/xen/device_tree.h