diff options
| author | Mitchel Humpherys <mitchelh@codeaurora.org> | 2014-11-11 17:08:57 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:11:21 -0700 |
| commit | 487d06ca4d9b73be3908e9b3ad5bf111483402d7 (patch) | |
| tree | d0016f56bedcfb69771e2ca5432c70438e524792 /include/uapi/linux/string.h | |
| parent | 57c7610235e8c40a20ac195b98401a1ea09b2318 (diff) | |
iommu/arm-smmu: support mapping to unattached domains
According to the IOMMU API, a domain doesn't necessarily need to be
attached to an IOMMU device before setting up mappings on that domain.
However, in the ARM SMMU driver we currently make the assumption that
the domain has already been attached to an SMMU. We use this assumption
for the following information:
(1) To know whether this is a stage1 or stage2 mapping
(2) To know whether we need to do an invalidate
(ARM_SMMU_OPT_INVALIDATE_ON_MAP)
(3) Address sanity checks based on the stage-1 and stage-2
sizes (which are determined by the SMMU configuration)
(4) To call the correct cache maintenance routines based on the SMMU
device pointer
Handle (1) by assuming that the mapping is stage1 by default. If
there's an SMMU attached we can check if this is a stage1 or stage2
mapping. This works for us at the moment because no one is setting up
stage2 mappings in the kernel.
Handle (2) by not invalidating on map if the domain isn't attached to an
SMMU since we shouldn't have anything to invalidate in that case
anyways.
Handle (3) by skipping the sanity checks for unattached domains.
Handle (4) by using the low-level caching APIs.
Currently we don't even free up the context bank when the device is
detached, presumably so that we don't have to set it up again on
re-attach. This limits the number of domains that can be attached to an
SMMU, even if they detach from it before the next one attaches. Remove
this 1-to-1 domain-to-SMMU assumption by freeing up the "domain
context" (context bank allocation, etc) on detach.
CRs-Fixed: 752812
Change-Id: I990a11ed52381ce4ecea0f82b4c6e2d54e08f2d6
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Diffstat (limited to 'include/uapi/linux/string.h')
0 files changed, 0 insertions, 0 deletions
