mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: aiyengar1990@gmail.com
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	heiko@sntech.de, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
	david.wu@rock-chips.com, dlemoal@kernel.org, cassel@kernel.org,
	fancer.lancer@gmail.com, netdev@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-ide@vger.kernel.org, praan@google.com, will@kernel.org,
	robin.murphy@arm.com, iommu@lists.linux.dev,
	shawn.lin@rock-chips.com, sebastian.reichel@collabora.com
Subject: Re: [PATCH 7/9] arm64: dts: rockchip: Add the clock and reset of the RK3588 PHP SMMU
Date: Tue, 17 Nov 2026 17:35:18 +0000	[thread overview]
Message-ID: <179493691896.3136.9977830842313145372@kernel.org> (raw)
In-Reply-To: <20261113-mmu600-php-v1-7-231196049a3b@gmail.com>

Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.

Critical: 0 · High: 1 · Medium: 2 · Low: 0

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [High] The patch does not do what its commit message says.
- [Medium] The patch adds `clocks` and `resets` to the mmu600_php node
  (compatible = "arm,smmu-v3"), but…
- [Medium] The commit message says the clock and reset are described "as
  for the PCIe SMMU", but the PCIe SMMU node has neither.

--

arm64: dts: rockchip: Add the clock and reset of the RK3588 PHP SMMU

This commit adds a clocks property (ACLK_MMU_PHP) and a resets property
(SRST_A_MMU_PHP) to the mmu600_php node in rk3588-base.dtsi. The stated
goal is to keep the SMMU clocked while its masters are idle.

> Describe ACLK_MMU_PHP, so the SMMU keeps its clock while its masters
> are idle, and SRST_A_MMU_PHP, as for the PCIe SMMU.

[Severity: Medium]
Is the "as for the PCIe SMMU" reference accurate? The mmu600_pcie node in
rk3588-base.dtsi has no clocks or resets:

	mmu600_pcie: iommu@fc900000 {
		compatible = "arm,smmu-v3";
		reg = <0x0 0xfc900000 0x0 0x200000>;
		interrupts = <GIC_SPI 369 IRQ_TYPE_EDGE_RISING 0>,
		...
		interrupt-names = "eventq", "gerror", "priq", "cmdq-sync";
		#iommu-cells = <1>;
	};

No rockchip DTS uses ACLK_MMU_PCIE or SRST_A_MMU_PCIE. The only MMU_PCIE
or MMU_PHP references are the two lines this patch adds.

mmu600_pcie is enabled by default, and its clock sits in the same place in
clk-rk3588.c. aclk_mmu_pcie is the parent of the aclk_pcie_*_mstr clocks:

	GATE(ACLK_MMU_PCIE, "aclk_mmu_pcie", "aclk_pcie_bridge", 0,
			RK3588_CLKGATE_CON(34), 7, GFLAGS),

Is a matching change for mmu600_pcie missing, or should the commit message
be reworded? If the reasoning is right, why does the PCIe SMMU not need
the same change?

> diff --git a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
> index 8807ce6193bfc..3bf8d0e4ff332 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
> @@ -570,6 +570,8 @@ mmu600_php: iommu@fcb00000 {
>  			     <GIC_SPI 386 IRQ_TYPE_EDGE_RISING 0>,
>  			     <GIC_SPI 379 IRQ_TYPE_EDGE_RISING 0>;
>  		interrupt-names = "eventq", "gerror", "priq", "cmdq-sync";
> +		clocks = <&cru ACLK_MMU_PHP>;
> +		resets = <&cru SRST_A_MMU_PHP>;

[Severity: High]
Does anything use these properties? mmu600_php binds to the generic
arm-smmu-v3 driver. arm_smmu_device_probe() never gets or enables a clock
and never touches a reset line.

There are no clk, reset_control or pm_runtime calls under
drivers/iommu/arm/arm-smmu-v3/, even at the end of the series. The
platform bus does not enable DT clocks by itself. The node also has no
power-domains that could add a pm_clk.

The gate is registered with flags 0 in clk-rk3588.c:

	GATE(ACLK_MMU_PHP, "aclk_mmu_php", "aclk_php_root", 0,
			RK3588_CLKGATE_CON(34), 8, GFLAGS),

So its enable count still comes only from its children: ACLK_GMAC0/1,
ACLK_SATA0/1/2 and ACLK_USB3OTG2. When the last of those masters disables
its aclk, the gate closes just as it did before this patch. If no master
ever enables it, clk_disable_unused() can close it at late_initcall.
Nothing drives SRST_A_MMU_PHP either.

The later patch "arm64: dts: rockchip: Enable the RK3588 PHP SMMU" removes
status = "disabled". After the series, the SMMU probes on every RK3588
board without the clock hold the commit message describes.

Later SMMU activity can then run with aclk_mmu_php gated, for example
cmdq, CFGI or TLBI commands on attach and detach, or event and gerror
handling. What a gated clock does to the SMMU at that point depends on the
Rockchip clock topology.

Does the SMMU driver need to own the clock and reset instead? That could
be devm_clk_bulk_get_all_enabled() plus reset handling in
arm_smmu_device_probe(), or a Rockchip impl hook behind a SoC-specific
compatible.

[Severity: Medium]
Will these properties pass dtbs_check? The binding
Documentation/devicetree/bindings/iommu/arm,smmu-v3.yaml lists neither
clocks nor resets, and it ends with:

additionalProperties: false

dtbs_check also validates disabled nodes. So every DTB that includes
rk3588-base.dtsi would flag 'clocks' and 'resets' as unexpected. No patch
in the series changes the iommu binding.

Would this need a SoC-specific compatible with conditional clocks and
resets in the binding, like the existing nvidia,tegra264-smmu entry, along
with driver support?

>  		#iommu-cells = <1>;
>  		status = "disabled";
>  	};

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261113-mmu600-php-v1-0-231196049a3b%40gmail.com

  reply	other threads:[~2026-11-17 17:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 16:38 [PATCH 0/9] RK3588: Enable the " Arun Iyengar via B4 Relay
2026-11-13 16:38 ` [PATCH 1/9] dt-bindings: net: rockchip-dwmac: Allow iommus Arun Iyengar via B4 Relay
2026-11-17 17:35   ` netdev-bot+sashiko
2026-11-13 16:38 ` [PATCH 2/9] dt-bindings: ata: rockchip,dwc-ahci: " Arun Iyengar via B4 Relay
2026-11-17 17:35   ` netdev-bot+sashiko
2026-11-13 16:38 ` [PATCH 3/9] dt-bindings: soc: rockchip: grf: Allow a clock for the RK3588 PHP GRF Arun Iyengar via B4 Relay
2026-11-17 17:35   ` netdev-bot+sashiko
2026-11-13 16:38 ` [PATCH 4/9] soc: rockchip: grf: Assign the StreamIDs of the RK3588 PHP SMMU masters Arun Iyengar via B4 Relay
2026-11-13 16:38 ` [PATCH 5/9] arm64: dts: rockchip: Add the PHP GRF clock on RK3588 Arun Iyengar via B4 Relay
2026-11-17 17:35   ` netdev-bot+sashiko
2026-11-13 16:38 ` [PATCH 6/9] soc: rockchip: grf: Restore the RK3588 PHP StreamIDs after system suspend Arun Iyengar via B4 Relay
2026-11-17 17:35   ` netdev-bot+sashiko
2026-11-13 16:38 ` [PATCH 7/9] arm64: dts: rockchip: Add the clock and reset of the RK3588 PHP SMMU Arun Iyengar via B4 Relay
2026-11-17 17:35   ` netdev-bot+sashiko [this message]
2026-11-13 16:38 ` [PATCH 8/9] arm64: dts: rockchip: Attach the masters " Arun Iyengar via B4 Relay
2026-11-17 17:35   ` netdev-bot+sashiko
2026-11-13 16:38 ` [PATCH 9/9] arm64: dts: rockchip: Enable " Arun Iyengar via B4 Relay
2026-11-17 17:35   ` netdev-bot+sashiko

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=179493691896.3136.9977830842313145372@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=aiyengar1990@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=cassel@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=david.wu@rock-chips.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=edumazet@kernel.org \
    --cc=fancer.lancer@gmail.com \
    --cc=heiko@sntech.de \
    --cc=iommu@lists.linux.dev \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=praan@google.com \
    --cc=robh@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=sebastian.reichel@collabora.com \
    --cc=shawn.lin@rock-chips.com \
    --cc=will@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

all inboxes | Powered by JetHome®