Skip to content
  • Sricharan R's avatar
    drivers: acpi: Handle IOMMU lookup failure with deferred probing or error · 5a1bb638
    Sricharan R authored
    
    
    This is an equivalent to the DT's handling of the iommu master's probe
    with deferred probing when the corrsponding iommu is not probed yet.
    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 firmware 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.
    
    Tested-by: default avatarHanjun Guo <hanjun.guo@linaro.org>
    Reviewed-by: default avatarRobin Murphy <robin.murphy@arm.com>
    [Lorenzo: Added fixes for dma_coherent_mask overflow, acpi_dma_configure
              called multiple times for same device]
    Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Signed-off-by: default avatarSricharan R <sricharan@codeaurora.org>
    Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
    5a1bb638