diff options
| author | Robin Murphy <robin.murphy@arm.com> | 2015-10-01 20:13:58 +0100 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:15:26 -0700 |
| commit | cef07fef91bab803f0c0462eb97b55ef158eb4b6 (patch) | |
| tree | 7506483a8647bad66e37e2fcb94806af4ec4eee7 /include/linux | |
| parent | e3bdc44a37d035c34bafd160866fa7f2e58d1149 (diff) | |
iommu: Implement common IOMMU ops for DMA mapping
Taking inspiration from the existing arch/arm code, break out some
generic functions to interface the DMA-API to the IOMMU-API. This will
do the bulk of the heavy lifting for IOMMU-backed dma-mapping.
Since associating an IOVA allocator with an IOMMU domain is a fairly
common need, rather than introduce yet another private structure just to
do this for ourselves, extend the top-level struct iommu_domain with the
notion. A simple opaque cookie allows reuse by other IOMMU API users
with their various different incompatible allocator types.
Change-Id: I4a49976c4e496025b2a2b2b9ef749666a239294b
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
[pdaly@codeaurora.org Add changes only in iommu.h]
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/iommu.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index b51913208c04..00e3f17319af 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -86,6 +86,7 @@ struct iommu_domain { iommu_fault_handler_t handler; void *handler_token; struct iommu_domain_geometry geometry; + void *iova_cookie; }; enum iommu_cap { |
