• Robin Murphy's avatar
    iommu: Introduce iommu_fwspec · 57f98d2f
    Robin Murphy authored
    Introduce a common structure to hold the per-device firmware data that
    most IOMMU drivers need to keep track of. This enables us to configure
    much of that data from common firmware code, and consolidate a lot of
    the equivalent implementations, device look-up tables, etc. which are
    currently strewn across IOMMU drivers.
    
    This will also be enable us to address the outstanding "multiple IOMMUs
    on the platform bus" problem by tweaking IOMMU API calls to prefer
    dev->fwspec->ops before falling back to dev->bus->iommu_ops, and thus
    gracefully handle those troublesome systems which we currently cannot.
    
    As the first user, hook up the OF IOMMU configuration mechanism. The
    driver-defined nature of DT cells means that we still need the drivers
    to translate and add the IDs themselves, but future users such as the
    much less free-form ACPI IORT will be much simpler and self-contained.
    
    CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Suggested-by: default avatarWill Deacon <will.deacon@arm.com>
    Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    57f98d2f
iommu.h 18.6 KB