]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iommu/qcom: Disable and reset context bank before programming
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Thu, 22 Jun 2023 09:27:39 +0000 (11:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:48:30 +0000 (09:48 +0200)
commitb3fdfdb5d8510684b7880718b4639058186367b4
tree20477ff7d207a5142ee38d857e208e78f6e4c021
parent58c928d4ae4bd5b4f8e99da99501667627dcdafe
iommu/qcom: Disable and reset context bank before programming

[ Upstream commit 9f3fef23d9b5a858a6e6d5f478bb1b6b76265e76 ]

Writing the new TTBRs, TCRs and MAIRs on a previously enabled
context bank may trigger a context fault, resulting in firmware
driven AP resets: change the domain initialization programming
sequence to disable the context bank(s) and to also clear the
related fault address (CB_FAR) and fault status (CB_FSR)
registers before writing new values to TTBR0/1, TCR/TCR2, MAIR0/1.

Fixes: 0ae349a0f33f ("iommu/qcom: Add qcom_iommu")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20230622092742.74819-4-angelogioacchino.delregno@collabora.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iommu/arm/arm-smmu/qcom_iommu.c