iommu/arm-smmu: Add a way for implementations to influence SCTLR
authorRob Clark <robdclark@chromium.org>
Mon, 9 Nov 2020 18:47:26 +0000 (11:47 -0700)
committerWill Deacon <will@kernel.org>
Tue, 10 Nov 2020 12:25:49 +0000 (12:25 +0000)
commitbffb2eaf0ba2c0bdd7fc2c4e194dab6783f5d8c1
tree1d43cb88cc0f25f8f946b05ec44e4ee226f7dbab
parent5c7469c66f953a2eb223468d7aa40062af9c14ab
iommu/arm-smmu: Add a way for implementations to influence SCTLR

For the Adreno GPU's SMMU, we want SCTLR.HUPCF set to ensure that
pending translations are not terminated on iova fault.  Otherwise
a terminated CP read could hang the GPU by returning invalid
command-stream data. Add a hook to for the implementation to modify
the sctlr value if it wishes.

Co-developed-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Link: https://lore.kernel.org/r/20201109184728.2463097-3-jcrouse@codeaurora.org
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c
drivers/iommu/arm/arm-smmu/arm-smmu.c
drivers/iommu/arm/arm-smmu/arm-smmu.h