]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
iommu/arm-smmu-qcom: Implement S2CR quirk
authorBjorn Andersson <bjorn.andersson@linaro.org>
Mon, 19 Oct 2020 18:23:23 +0000 (11:23 -0700)
committerPaolo Pisati <paolo.pisati@canonical.com>
Mon, 4 Jan 2021 15:47:31 +0000 (16:47 +0100)
commit1ee58d51f2247a166aed256fc18b79f97b69d2af
tree5be771ac194e88f0cc221be74ab1a7a239954016
parent255c3e859e7ba010e7572877527c290f57351791
iommu/arm-smmu-qcom: Implement S2CR quirk

BugLink: https://bugs.launchpad.net/bugs/1910111
commit f9081b8ff5934b8d69c748d0200e844cadd2c667 upstream.

The firmware found in some Qualcomm platforms intercepts writes to S2CR
in order to replace bypass type streams with fault; and ignore S2CR
updates of type fault.

Detect this behavior and implement a custom write_s2cr function in order
to trick the firmware into supporting bypass streams by the means of
configuring the stream for translation using a reserved and disabled
context bank.

Also circumvent the problem of configuring faulting streams by
configuring the stream as bypass.

Cc: <stable@vger.kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Tested-by: Steev Klimaszewski <steev@kali.org>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20201019182323.3162386-4-bjorn.andersson@linaro.org
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c