diff options
author | Thierry Reding <treding@nvidia.com> | 2023-01-20 20:42:50 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2023-01-25 13:48:28 +0300 |
commit | a5bf3cfce8cb77d9d24613ab52d520896f83dd48 (patch) | |
tree | 538a32161b122b9d8dbf23704c57599c505307da /include/linux/of_iommu.h | |
parent | af0d81357cc558ff40968b4e04131e08ae540127 (diff) | |
download | linux-a5bf3cfce8cb77d9d24613ab52d520896f83dd48.tar.xz |
iommu: Implement of_iommu_get_resv_regions()
This is an implementation that IOMMU drivers can use to obtain reserved
memory regions from a device tree node. It uses the reserved-memory DT
bindings to find the regions associated with a given device. If these
regions are marked accordingly, identity mappings will be created for
them in the IOMMU domain that the devices will be attached to.
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: devicetree@vger.kernel.org
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20230120174251.4004100-4-thierry.reding@gmail.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'include/linux/of_iommu.h')
-rw-r--r-- | include/linux/of_iommu.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/of_iommu.h b/include/linux/of_iommu.h index 55c1eb300a86..9a5e6b410dd2 100644 --- a/include/linux/of_iommu.h +++ b/include/linux/of_iommu.h @@ -12,6 +12,9 @@ extern const struct iommu_ops *of_iommu_configure(struct device *dev, struct device_node *master_np, const u32 *id); +extern void of_iommu_get_resv_regions(struct device *dev, + struct list_head *list); + #else static inline const struct iommu_ops *of_iommu_configure(struct device *dev, @@ -21,6 +24,11 @@ static inline const struct iommu_ops *of_iommu_configure(struct device *dev, return NULL; } +static inline void of_iommu_get_resv_regions(struct device *dev, + struct list_head *list) +{ +} + #endif /* CONFIG_OF_IOMMU */ #endif /* __OF_IOMMU_H */ |