[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210621165230.5.I091ed869d3b324a483a355d873ce6bf1dc2da5ba@changeid>
Date: Mon, 21 Jun 2021 16:52:47 -0700
From: Douglas Anderson <dianders@...omium.org>
To: gregkh@...uxfoundation.org, rafael@...nel.org,
rafael.j.wysocki@...el.com, will@...nel.org, robin.murphy@....com,
joro@...tes.org, bjorn.andersson@...aro.org,
ulf.hansson@...aro.org, adrian.hunter@...el.com,
bhelgaas@...gle.com
Cc: robdclark@...omium.org, linux-arm-msm@...r.kernel.org,
linux-pci@...r.kernel.org, quic_c_gdjako@...cinc.com,
iommu@...ts.linux-foundation.org, sonnyrao@...omium.org,
saiprakash.ranjan@...eaurora.org, linux-mmc@...r.kernel.org,
vbadigan@...eaurora.org, rajatja@...gle.com, saravanak@...gle.com,
joel@...lfernandes.org, Douglas Anderson <dianders@...omium.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH 5/6] iommu: Stop reaching into PCIe devices to decide strict vs. non-strict
We now have a way for PCIe devices to force iommu.strict through the
"struct device" and that's now hooked up. Let's remove the special
case for PCIe devices.
NOTE: there are still other places in this file that make decisions
based on the PCIe "untrusted" status. This patch only handles removing
the one related to iommu.strict. Removing the other cases is left as
an exercise to the reader.
Signed-off-by: Douglas Anderson <dianders@...omium.org>
---
drivers/iommu/dma-iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index 7bcdd1205535..e50c06ce1a6b 100644
--- a/drivers/iommu/dma-iommu.c
+++ b/drivers/iommu/dma-iommu.c
@@ -368,7 +368,7 @@ static int iommu_dma_init_domain(struct iommu_domain *domain, dma_addr_t base,
init_iova_domain(iovad, 1UL << order, base_pfn);
- if (!cookie->fq_domain && (!dev || !dev_is_untrusted(dev)) &&
+ if (!cookie->fq_domain &&
domain->ops->flush_iotlb_all && !iommu_get_dma_strict(domain)) {
if (init_iova_flush_queue(iovad, iommu_dma_flush_iotlb_all,
iommu_dma_entry_dtor))
--
2.32.0.288.g62a8d224e6-goog
Powered by blists - more mailing lists