From: Thierry Reding Date: Fri, 20 Jan 2023 17:42:51 +0000 (+0100) Subject: iommu: dma: Use of_iommu_get_resv_regions() X-Git-Tag: v6.3-rc1~104^2^8~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5cef282e295f7cf623672470d040716d1e3eacf2;p=thirdparty%2Fkernel%2Flinux.git iommu: dma: Use of_iommu_get_resv_regions() For device tree nodes, use the standard of_iommu_get_resv_regions() implementation to obtain the reserved memory regions associated with a device. Cc: Rob Herring Cc: Frank Rowand Cc: devicetree@vger.kernel.org Acked-by: Robin Murphy Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20230120174251.4004100-5-thierry.reding@gmail.com Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index f798c44e09033..8e023f032b763 100644 --- a/drivers/iommu/dma-iommu.c +++ b/drivers/iommu/dma-iommu.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -391,6 +392,8 @@ void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list) if (!is_of_node(dev_iommu_fwspec_get(dev)->iommu_fwnode)) iort_iommu_get_resv_regions(dev, list); + if (dev->of_node) + of_iommu_get_resv_regions(dev, list); } EXPORT_SYMBOL(iommu_dma_get_resv_regions);