diff options
author | Robin Murphy <robin.murphy@arm.com> | 2016-09-12 17:13:50 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-09-16 09:34:18 +0100 |
commit | 8e8b203eabd8b9e96d02d6339e4abce3e5a7ea4b (patch) | |
tree | ae8e934e6061d725c285e46e99b1d72501627fa7 /drivers/iommu/amd_iommu.c | |
parent | 1f3d5ca43019bff1105838712d55be087d93c0da (diff) | |
download | blackbird-op-linux-8e8b203eabd8b9e96d02d6339e4abce3e5a7ea4b.tar.gz blackbird-op-linux-8e8b203eabd8b9e96d02d6339e4abce3e5a7ea4b.zip |
iommu/arm-smmu: Keep track of S2CR state
Making S2CRs first-class citizens within the driver with a high-level
representation of their state offers a neat solution to a few problems:
Firstly, the information about which context a device's stream IDs are
associated with is already present by necessity in the S2CR. With that
state easily accessible we can refer directly to it and obviate the need
to track an IOMMU domain in each device's archdata (its earlier purpose
of enforcing correct attachment of multi-device groups now being handled
by the IOMMU core itself).
Secondly, the core API now deprecates explicit domain detach and expects
domain attach to move devices smoothly from one domain to another; for
SMMUv2, this notion maps directly to simply rewriting the S2CRs assigned
to the device. By giving the driver a suitable abstraction of those
S2CRs to work with, we can massively reduce the overhead of the current
heavy-handed "detach, free resources, reallocate resources, attach"
approach.
Thirdly, making the software state hardware-shaped and attached to the
SMMU instance once again makes suspend/resume of this register group
that much simpler to implement in future.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'drivers/iommu/amd_iommu.c')
0 files changed, 0 insertions, 0 deletions