From: Douglas Anderson <dianders@chromium.org>
To: will@kernel.org, robin.murphy@arm.com, joro@8bytes.org,
bjorn.andersson@linaro.org, ulf.hansson@linaro.org,
adrian.hunter@intel.com, bhelgaas@google.com
Cc: john.garry@huawei.com, robdclark@chromium.org,
quic_c_gdjako@quicinc.com, saravanak@google.com,
rajatja@google.com, saiprakash.ranjan@codeaurora.org,
vbadigan@codeaurora.org, linux-mmc@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org,
iommu@lists.linux-foundation.org, sonnyrao@chromium.org,
joel@joelfernandes.org, Douglas Anderson <dianders@chromium.org>,
Jordan Crouse <jordan@cosmicpenguin.net>,
Krishna Reddy <vdumpa@nvidia.com>,
Nicolin Chen <nicoleotsuka@gmail.com>,
Thierry Reding <thierry.reding@gmail.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/3] iommu/arm-smmu: Check for strictness after calling impl->init_context()
Date: Thu, 24 Jun 2021 10:17:58 -0700 [thread overview]
Message-ID: <20210624101557.v2.2.I0ddf490bdaa450eb50ab568f35b1cae03bf358f0@changeid> (raw)
In-Reply-To: <20210624171759.4125094-1-dianders@chromium.org>
Implementations should be able to affect the strictness so reorder a
little bit so we call them before we look at the strictness.
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
Changes in v2:
- Patch moving check for strictness in arm-smmu new for v2.
drivers/iommu/arm/arm-smmu/arm-smmu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c
index 6f72c4d208ca..659d3fddffa5 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c
@@ -761,15 +761,15 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
.iommu_dev = smmu->dev,
};
- if (!iommu_get_dma_strict(domain))
- pgtbl_cfg.quirks |= IO_PGTABLE_QUIRK_NON_STRICT;
-
if (smmu->impl && smmu->impl->init_context) {
ret = smmu->impl->init_context(smmu_domain, &pgtbl_cfg, dev);
if (ret)
goto out_clear_smmu;
}
+ if (!iommu_get_dma_strict(domain))
+ pgtbl_cfg.quirks |= IO_PGTABLE_QUIRK_NON_STRICT;
+
if (smmu_domain->pgtbl_quirks)
pgtbl_cfg.quirks |= smmu_domain->pgtbl_quirks;
--
2.32.0.93.g670b81a890-goog
next prev parent reply other threads:[~2021-06-24 17:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-24 17:17 [PATCH v2 0/3] iommu: Enable non-strict DMA on QCom SD/MMC Douglas Anderson
2021-06-24 17:17 ` [PATCH v2 1/3] iommu: Add per-domain strictness and combine with the global default Douglas Anderson
2021-06-24 17:17 ` Douglas Anderson [this message]
2021-06-24 17:17 ` [PATCH v2 3/3] mmc: sdhci-msm: Request non-strict IOMMU mode Douglas Anderson
2021-06-24 23:05 ` Doug Anderson
2021-06-25 13:18 ` [PATCH v2 0/3] iommu: Enable non-strict DMA on QCom SD/MMC Joerg Roedel
2021-06-25 14:42 ` Doug Anderson
2021-07-07 20:00 ` Doug Anderson
2021-07-08 8:08 ` Joerg Roedel
2021-07-08 14:36 ` Doug Anderson
2021-07-13 18:07 ` Robin Murphy
2021-07-14 15:14 ` Doug Anderson
2021-08-03 0:09 ` Rajat Jain
2021-08-03 0:34 ` Rajat Jain
2021-08-03 8:19 ` Robin Murphy
2021-07-09 13:56 ` Robin Murphy
2021-07-14 10:15 ` Joerg Roedel
2021-07-14 10:29 ` Robin Murphy
2021-07-14 10:48 ` Joerg Roedel
2021-07-09 19:21 ` Robin Murphy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210624101557.v2.2.I0ddf490bdaa450eb50ab568f35b1cae03bf358f0@changeid \
--to=dianders@chromium.org \
--cc=adrian.hunter@intel.com \
--cc=bhelgaas@google.com \
--cc=bjorn.andersson@linaro.org \
--cc=iommu@lists.linux-foundation.org \
--cc=joel@joelfernandes.org \
--cc=john.garry@huawei.com \
--cc=jordan@cosmicpenguin.net \
--cc=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=nicoleotsuka@gmail.com \
--cc=quic_c_gdjako@quicinc.com \
--cc=rajatja@google.com \
--cc=robdclark@chromium.org \
--cc=robin.murphy@arm.com \
--cc=saiprakash.ranjan@codeaurora.org \
--cc=saravanak@google.com \
--cc=sonnyrao@chromium.org \
--cc=thierry.reding@gmail.com \
--cc=ulf.hansson@linaro.org \
--cc=vbadigan@codeaurora.org \
--cc=vdumpa@nvidia.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).