public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Luca Weiss" <luca.weiss@fairphone.com>
To: "Konrad Dybcio" <konradybcio@kernel.org>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	<cros-qcom-dts-watchers@chromium.org>
Cc: "Marijn Suijten" <marijn.suijten@somainline.org>,
	<linux-arm-msm@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	"Konrad Dybcio" <quic_kdybcio@quicinc.com>
Subject: Re: [PATCH RFC 07/11] arm64: dts: qcom: sm6350: Affirm IDR0.CCTW on apps_smmu
Date: Tue, 24 Sep 2024 09:15:12 +0200	[thread overview]
Message-ID: <D4EBVCYB1A56.21TT1WFRGCYGN@fairphone.com> (raw)
In-Reply-To: <20240919-topic-apps_smmu_coherent-v1-7-5b3a8662403d@quicinc.com>

On Thu Sep 19, 2024 at 12:57 AM CEST, Konrad Dybcio wrote:
> From: Konrad Dybcio <quic_kdybcio@quicinc.com>
>
> On RPMh-based SoCs, the APPS SMMU advertizes support for cache-coherent
> pagetable walk via the IDR0 register. This however is not respected by
> the arm-smmu driver unless dma-coherent is set.
>
> Mark the node as dma-coherent to ensure this (and other) implementations
> take this coherency into account.

Hi Konrad!

Similar to [0] everything seems to look fine on SM7225 Fairphone 4.

[    0.190433] arm-smmu 15000000.iommu: probing hardware configuration...
[    0.190459] arm-smmu 15000000.iommu: SMMUv2 with:
[    0.190499] arm-smmu 15000000.iommu:         stage 1 translation
[    0.190515] arm-smmu 15000000.iommu:         coherent table walk
[    0.190531] arm-smmu 15000000.iommu:         stream matching with 71 register groups
[    0.190560] arm-smmu 15000000.iommu:         63 context banks (0 stage-2 only)
[    0.191097] arm-smmu 15000000.iommu:         Supported page sizes: 0x61311000
[    0.191114] arm-smmu 15000000.iommu:         Stage-1: 36-bit VA -> 36-bit IPA
[    0.191299] arm-smmu 15000000.iommu:         preserved 0 boot mappings

The Adreno SMMU still has non-coherent table walk.

[    1.141215] arm-smmu 3d40000.iommu: probing hardware configuration...
[    1.141243] arm-smmu 3d40000.iommu: SMMUv2 with:
[    1.141270] arm-smmu 3d40000.iommu:  stage 1 translation
[    1.141279] arm-smmu 3d40000.iommu:  address translation ops
[    1.141288] arm-smmu 3d40000.iommu:  non-coherent table walk
[    1.141296] arm-smmu 3d40000.iommu:  (IDR0.CTTW overridden by FW configuration)
[    1.141307] arm-smmu 3d40000.iommu:  stream matching with 5 register groups
[    1.141326] arm-smmu 3d40000.iommu:  5 context banks (0 stage-2 only)
[    1.141347] arm-smmu 3d40000.iommu:  Supported page sizes: 0x63315000
[    1.141356] arm-smmu 3d40000.iommu:  Stage-1: 48-bit VA -> 36-bit IPA
[    1.141568] arm-smmu 3d40000.iommu:  preserved 0 boot mappings


Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sm7225-fairphone-fp4

[0] https://lore.kernel.org/linux-arm-msm/CAD=FV=Xrbe1NO+trk1SJ30gHm5jLFjd0bAeG3H46gD+vNFZa1w@mail.gmail.com/

Regards
Luca

>
> Signed-off-by: Konrad Dybcio <quic_kdybcio@quicinc.com>
> ---
>  arch/arm64/boot/dts/qcom/sm6350.dtsi | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> index 7986ddb30f6e8ce6ceeb0f90772b0243aed6bffe..54cfe99006613f8ccc5bf6d83bcb4bf8e72f3cfe 100644
> --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> @@ -2685,6 +2685,7 @@ apps_smmu: iommu@15000000 {
>  				     <GIC_SPI 411 IRQ_TYPE_LEVEL_HIGH>,
>  				     <GIC_SPI 412 IRQ_TYPE_LEVEL_HIGH>,
>  				     <GIC_SPI 413 IRQ_TYPE_LEVEL_HIGH>;
> +			dma-coherent;
>  		};
>  
>  		intc: interrupt-controller@17a00000 {


  reply	other threads:[~2024-09-24  7:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-18 22:57 [RFC PATCH 00/11] Affirm SMMU coherent pagetable walker capability on RPMh SoCs Konrad Dybcio
2024-09-18 22:57 ` [PATCH RFC 01/11] arm64: dts: qcom: qdu1000: Affirm IDR0.CCTW on apps_smmu Konrad Dybcio
2024-09-18 22:57 ` [PATCH RFC 02/11] arm64: dts: qcom: sc7180: " Konrad Dybcio
2024-09-20 13:44   ` Doug Anderson
2024-09-18 22:57 ` [PATCH RFC 03/11] arm64: dts: qcom: sc8180x: " Konrad Dybcio
2024-09-18 22:57 ` [PATCH RFC 04/11] arm64: dts: qcom: sc8280xp: " Konrad Dybcio
2024-09-18 22:57 ` [PATCH RFC 05/11] arm64: dts: qcom: sdm670: " Konrad Dybcio
2024-09-18 22:57 ` [PATCH RFC 06/11] arm64: dts: qcom: sdm845: " Konrad Dybcio
2024-09-18 22:57 ` [PATCH RFC 07/11] arm64: dts: qcom: sm6350: " Konrad Dybcio
2024-09-24  7:15   ` Luca Weiss [this message]
2024-09-24  7:37     ` Luca Weiss
2024-09-24 10:04       ` Konrad Dybcio
2024-09-18 22:57 ` [PATCH RFC 08/11] arm64: dts: qcom: sm8150: " Konrad Dybcio
2024-09-18 22:57 ` [PATCH RFC 09/11] arm64: dts: qcom: sm8350: " Konrad Dybcio
2024-09-18 22:57 ` [PATCH RFC 10/11] arm64: dts: qcom: sm8450: " Konrad Dybcio
2024-09-18 22:57 ` [PATCH RFC 11/11] arm64: dts: qcom: x1e80100: " Konrad Dybcio
2024-09-19  7:00 ` [RFC PATCH 00/11] Affirm SMMU coherent pagetable walker capability on RPMh SoCs Luca Weiss
2024-09-19 10:07   ` Konrad Dybcio
2024-09-19 18:48     ` Steev Klimaszewski
2024-09-20  7:35 ` neil.armstrong
2024-10-07 14:25 ` Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D4EBVCYB1A56.21TT1WFRGCYGN@fairphone.com \
    --to=luca.weiss@fairphone.com \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=cros-qcom-dts-watchers@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=quic_kdybcio@quicinc.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox