]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
iommu: Introduce iommu_fwspec
authorRobin Murphy <robin.murphy@arm.com>
Tue, 13 Sep 2016 09:54:14 +0000 (10:54 +0100)
committerWill Deacon <will.deacon@arm.com>
Fri, 16 Sep 2016 08:34:15 +0000 (09:34 +0100)
commit57f98d2f61e191ef9d06863c9ce3f8621f3671ef
treefd6d52282bcada86b0893b9972eaa5b8a5f219e1
parentb996444cf35e736621855e73f9d0762bd49f41f2
iommu: Introduce iommu_fwspec

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: Will Deacon <will.deacon@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
drivers/iommu/iommu.c
drivers/iommu/of_iommu.c
include/linux/device.h
include/linux/iommu.h