]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iommu/arm-smmu-qcom: Fix fastrpc compatible string in ACTLR client match table
authorBibek Kumar Patro <bibek.patro@oss.qualcomm.com>
Thu, 23 Apr 2026 10:02:30 +0000 (15:32 +0530)
committerWill Deacon <will@kernel.org>
Tue, 19 May 2026 10:15:08 +0000 (11:15 +0100)
The qcom_smmu_actlr_client_of_match table contained "qcom,fastrpc" as
the compatible string for applying ACTLR prefetch settings to FastRPC
devices. However, "qcom,fastrpc" is the compatible string for the parent
rpmsg channel node, which is not an IOMMU client — it carries no
"iommus" property in the device tree and is never attached to an SMMU
context bank.

The actual IOMMU clients are the compute context bank (CB) child nodes,
which use the compatible string "qcom,fastrpc-compute-cb". These nodes
carry the "iommus" property and are probed by fastrpc_cb_driver via
fastrpc_cb_probe(), which sets up the DMA mask and IOMMU mappings for
each FastRPC session. The device tree structure is:

  fastrpc {
      compatible = "qcom,fastrpc";        /* rpmsg channel, no iommus */
      ...
      compute-cb@3 {
          compatible = "qcom,fastrpc-compute-cb";
          iommus = <&apps_smmu 0x1823 0x0>;  /* actual IOMMU client */
      };
  };

Since qcom_smmu_set_actlr_dev() calls of_match_device() against the
device being attached to the SMMU context bank, the "qcom,fastrpc"
entry was never matching any device. As a result, the ACTLR prefetch
settings (PREFETCH_DEEP | CPRE | CMTLB) were silently never applied
for FastRPC compute context banks.

Fix this by replacing "qcom,fastrpc" with "qcom,fastrpc-compute-cb"
in the match table so that the ACTLR settings are correctly applied
to the compute CB devices that are the true IOMMU clients.

Assisted-by: Claude:claude-sonnet-4-6
Fixes: 3e35c3e725de ("iommu/arm-smmu: Add ACTLR data and support for qcom_smmu_500")
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Shawn Guo <shengchao.guo@oss.qualcomm.com>
Signed-off-by: Bibek Kumar Patro <bibek.patro@oss.qualcomm.com>
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c

index edd41b5a3b6ac29b161d8eb98345ff692659b824..2d006049dd61090c06cb5c47f08c5fbfb391a72e 100644 (file)
@@ -39,7 +39,7 @@ static const struct of_device_id qcom_smmu_actlr_client_of_match[] = {
                        .data = (const void *) (PREFETCH_DEEP | CPRE | CMTLB) },
        { .compatible = "qcom,adreno-smmu",
                        .data = (const void *) (PREFETCH_DEEP | CPRE | CMTLB) },
-       { .compatible = "qcom,fastrpc",
+       { .compatible = "qcom,fastrpc-compute-cb",
                        .data = (const void *) (PREFETCH_DEEP | CPRE | CMTLB) },
        { .compatible = "qcom,qcm2290-mdss",
                        .data = (const void *) (PREFETCH_SHALLOW | CPRE | CMTLB) },