iommu/arm-smmu-qcom: Limit the SMR groups to 128
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Mon, 27 Mar 2023 08:00:29 +0000 (13:30 +0530)
committerWill Deacon <will@kernel.org>
Mon, 27 Mar 2023 12:39:48 +0000 (13:39 +0100)
commit12261134732689b7e30c59db9978f81230965181
treeff1d1bfc74865d04143ad779f4bbf310b5fae51e
parent8c153645fa402ee96ec3c2fef9db3a087b3667ac
iommu/arm-smmu-qcom: Limit the SMR groups to 128

Some platforms support more than 128 stream matching groups than what is
defined by the ARM SMMU architecture specification. But due to some unknown
reasons, those additional groups don't exhibit the same behavior as the
architecture supported ones.

For instance, the additional groups will not detect the quirky behavior of
some firmware versions intercepting writes to S2CR register, thus skipping
the quirk implemented in the driver and causing boot crash.

So let's limit the groups to 128 for now until the issue with those groups
are fixed and issue a notice to users in that case.

Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20230327080029.11584-1-manivannan.sadhasivam@linaro.org
[will: Reworded the comment slightly]
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c