Thread (59 messages) 59 messages, 5 authors, 2020-09-01

Re: [RFC v12 13/13] iommu/arm-smmu: Add a init_context_bank implementation hook

From: Will Deacon <will@kernel.org>
Date: 2020-08-13 13:03:51
Also in: linux-arm-msm, linux-iommu, lkml

On Mon, Aug 10, 2020 at 04:26:57PM -0600, Jordan Crouse wrote:
Add a new implementation hook to allow the implementation specific code
to tweek the context bank configuration just before it gets written.
The first user will be the Adreno GPU implementation to turn on
SCTLR.HUPCF to ensure that a page fault doesn't terminating pending
transactions. Doing so could hang the GPU if one of the terminated
transactions is a CP read.

Signed-off-by: Jordan Crouse <redacted>
---

 drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 16 ++++++++++++++++
 drivers/iommu/arm/arm-smmu/arm-smmu.c      | 21 +++++++++++++--------
 drivers/iommu/arm/arm-smmu/arm-smmu.h      |  5 +++++
 3 files changed, 34 insertions(+), 8 deletions(-)
We already have ->init_context(), so I'd prefer to use that instead of
adding another callback. Could we stick a couple of fields in
smmu_domain->cfg (e.g. sctlr_set, sctlr_clr) and handle those a bit like
we do for the asid/vmid on cavium implementations?

Will

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help