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 9/9] arm64: dts: rockchip: Enable the RK3588 PHP SMMU
Date: Tue, 17 Nov 2026 17:35:22 +0000 [thread overview]
Message-ID: <179493692280.3136.14096741635369747694@kernel.org> (raw)
In-Reply-To: <20261113-mmu600-php-v1-9-231196049a3b@gmail.com>
Thank you for your contribution! Sashiko AI review found 3 potential
issue(s) to consider.
Critical: 1 · High: 1 · Medium: 0 · Low: 1
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).
- [Critical] This patch enables mmu600_php on every RK3588 board, but the
kernel cannot restore the SMMU after deep suspend.
- [High] This patch's commit message says "the SMMU has its clock", and
the earlier series commit "arm64: dts: rockchip: Add the clock and…
- [Low] The mmu600_php node that this patch enables has `clocks = <&cru
ACLK_MMU_PHP>;` and `resets = <&cru SRST_A_MMU_PHP>;`…
--
arm64: dts: rockchip: Enable the RK3588 PHP SMMU
This commit removes status = "disabled" from the mmu600_php node in
rk3588-base.dtsi. That enables the arm-smmu-v3 instance in front of the
PHP masters (GMAC, SATA, USB3 host2) on all RK3588 boards. The commit
message notes that PD_PHP loses power in deep suspend and that arm-smmu-v3
system sleep support is needed.
Link: https://lore.kernel.org/r/20260929034510.2023173-1-praan@google.com
> diff --git a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
> index cb0a39f637887..0c3d59a391826 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
> @@ -574,7 +574,6 @@ mmu600_php: iommu@fcb00000 {
> clocks = <&cru ACLK_MMU_PHP>;
> resets = <&cru SRST_A_MMU_PHP>;
[Severity: High]
The commit message says "the SMMU has its clock". Does anything actually
enable ACLK_MMU_PHP for the SMMU?
The arm-smmu-v3 driver has no clk_get()/clk_prepare_enable(), reset_control
or pm_runtime handling. The node has no power-domains, so genpd pm_clk
does not apply. The platform core does not enable DT clocks by itself
either.
In drivers/clk/rockchip/clk-rk3588.c the clock is a plain gate with no
flags:
GATE(ACLK_MMU_PHP, "aclk_mmu_php", "aclk_php_root", 0,
RK3588_CLKGATE_CON(34), 8, GFLAGS),
Its only enable references come from its children ACLK_GMAC0/1,
ACLK_SATA0/1/2 and ACLK_USB3OTG2. Two things can turn it off:
- clk_disable_unused at late_initcall_sync, when no master is bound
(modular drivers, or a board that enables only some PHP masters).
- The last master disabling its ACLK on runtime suspend or remove.
The SMMU driver still touches the hardware after that. It issues CMDQ
TLBI/CFGI plus CMD_SYNC on unmap and on flush-queue timeouts, it runs the
eventq/gerror handlers, and at reboot it runs:
arm_smmu_device_shutdown()
arm_smmu_disable_action()
That usually happens after the consumer masters have already shut down.
Could this cause CMD_SYNC timeouts or a stalled bus access? The "Add the
PHP GRF clock on RK3588" commit in this series describes a similar hang
for pclk_php_root.
The earlier commit "arm64: dts: rockchip: Add the clock and reset of the
RK3588 PHP SMMU" says the clock was added "so the SMMU keeps its clock
while its masters are idle". Does that need clock handling in the driver
(plus a binding update), or the gate marked as critical or
ignore-unused, rather than only the DT property?
[Severity: Low]
Will this node pass dtbs_check now that it is enabled? The binding in
Documentation/devicetree/bindings/iommu/arm,smmu-v3.yaml does not define
clocks, resets or power-domains, and it has:
additionalProperties: false
No patch in the series updates this binding, although the dwmac, ahci and
grf bindings are updated.
Also, the "Add the clock and reset..." commit says the reset is added "as
for the PCIe SMMU". The sibling mmu600_pcie node, which uses the same
compatible, has neither clocks nor resets.
> #iommu-cells = <1>;
> - status = "disabled";
[Severity: Critical]
The commit message says:
PD_PHP is powered off in deep suspend and the SMMU resumes from reset
in bypass, so this needs arm-smmu-v3 system sleep support [1].
Is that support in the tree this patch applies to? No earlier patch in
the series seems to add it.
In drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c, arm_smmu_driver has no
.pm:
static struct platform_driver arm_smmu_driver = {
.driver = { ... },
.probe = arm_smmu_device_probe,
.remove = arm_smmu_device_remove,
.shutdown = arm_smmu_device_shutdown,
};
The only code that programs the stream table, the queues and SMMUEN is
arm_smmu_device_reset(), and only arm_smmu_device_probe() calls it. The
syscore op added to drivers/soc/rockchip/grf.c earlier in the series
restores only the PHP GRF StreamID registers.
With this node enabled, the PHP masters get IOMMU DMA domains and their
drivers program IOVAs. Those masters are usb_host2_xhci, gmac1, sata0 and
sata2, plus gmac0 and sata1 from rk3588-extra.dtsi.
After a deep suspend cycle, does the SMMU stay in its reset bypass state
while stmmac, ahci and xhci keep using descriptor rings and buffers at
their old IOVAs?
If so, the IOVAs would be treated as physical addresses. On gmac RX the
frame contents come from the network and would be written to whatever RAM
or MMIO sits at that address. TX and SATA/USB reads could leak arbitrary
memory.
PD_PHP is also defined only in drivers/pmdomain/rockchip/pm-domains.c and
the dt-bindings header. No DTS references it, and mmu600_php has no
power-domains property, so genpd cannot order an SMMU save and restore
either.
Before this patch the node was disabled and these masters used direct
DMA, so suspend did not hit this problem. Should enabling this node wait
until the arm-smmu-v3 sleep support in [1] is merged?
> };
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261113-mmu600-php-v1-0-231196049a3b%40gmail.com
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
prev parent reply other threads:[~2026-11-17 17:36 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 PHP SMMU 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
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 [this message]
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=179493692280.3136.14096741635369747694@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