[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1620656249-68890-12-git-send-email-john.garry@huawei.com>
Date: Mon, 10 May 2021 22:17:25 +0800
From: John Garry <john.garry@...wei.com>
To: <joro@...tes.org>, <will@...nel.org>, <robin.murphy@....com>,
<hch@....de>, <m.szyprowski@...sung.com>
CC: <iommu@...ts.linux-foundation.org>, <baolu.lu@...ux.intel.com>,
<linux-kernel@...r.kernel.org>, <linux-scsi@...r.kernel.org>,
<linuxarm@...wei.com>, <sai.praneeth.prakhya@...el.com>,
John Garry <john.garry@...wei.com>
Subject: [PATCH v2 11/15] dma-iommu: Reconfig group domain
Call iommu_reconfig_dev_group_dma() from iommu_setup_dma_ops() to reconfig
the group domain, if necessary.
Signed-off-by: John Garry <john.garry@...wei.com>
---
drivers/iommu/dma-iommu.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index 574d7a901fd2..1d58c7a2d85d 100644
--- a/drivers/iommu/dma-iommu.c
+++ b/drivers/iommu/dma-iommu.c
@@ -1358,6 +1358,9 @@ void iommu_setup_dma_ops(struct device *dev, u64 dma_base, u64 size)
* underlying IOMMU driver needs to support via the dma-iommu layer.
*/
if (domain->type == IOMMU_DOMAIN_DMA) {
+ iommu_reconfig_dev_group_dma(dev);
+ /* domain may be stale ... */
+ domain = iommu_get_domain_for_dev(dev);
if (iommu_dma_init_domain(domain, dma_base, size, dev))
goto out_err;
dev->dma_ops = &iommu_dma_ops;
--
2.26.2
Powered by blists - more mailing lists