diff options
| author | Mitchel Humpherys <mitchelh@codeaurora.org> | 2016-04-05 13:21:53 -0700 |
|---|---|---|
| committer | Jeevan Shriram <jshriram@codeaurora.org> | 2016-05-20 19:23:50 -0700 |
| commit | a3250a9555f1adf9367d2c82329671b2ef35311a (patch) | |
| tree | 4ce55f808f45ff893d4c4549a95f13b75915b447 /include/linux | |
| parent | 1849bdccf358a20d4a283a7aa4073c79496eb466 (diff) | |
iommu: Support dynamic pgsize_bitmap
Currently we use a single pgsize_bitmap per IOMMU driver. However, some
IOMMU drivers might service different IOMMUs with different supported
page sizes. Some drivers might also want to restrict page sizes for
different use cases. Support these use cases by adding a
.get_pgsize_bitmap function to the iommu_ops which can optionally be
used by the driver to return a domain-specific pgsize_bitmap.
CRs-Fixed: 997751
Change-Id: I46d70733be647599e148fe52258a4d8f009ac48a
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/iommu.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 82c397b30628..0527a315adad 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -167,6 +167,8 @@ struct iommu_dm_region { * @domain_set_attr: Change domain attributes * @of_xlate: add OF master IDs to iommu grouping * @pgsize_bitmap: bitmap of supported page sizes + * @get_pgsize_bitmap: gets a bitmap of supported page sizes for a domain + * This takes precedence over @pgsize_bitmap. * @trigger_fault: trigger a fault on the device attached to an iommu domain * @reg_read: read an IOMMU register * @reg_write: write an IOMMU register @@ -222,6 +224,7 @@ struct iommu_ops { int (*of_xlate)(struct device *dev, struct of_phandle_args *args); #endif + unsigned long (*get_pgsize_bitmap)(struct iommu_domain *domain); unsigned long pgsize_bitmap; void *priv; }; |
