arm64: dts: rockchip: add dma-coherent for pcie and gmac of RK3576
Subsystems (2)
PATCH 1/1 arm64: dts: rockchip: add dma-coherent for pcie and gmac of RK3576
The RK3576 SoC employs ARM CCI for maintaining cache coherency between the CPU cluster and high-speed peripherals including USB3, SATA, GMAC, and PCIe controllers. While the USB3 and SATA controllers were correctly marked as dma-coherent, the GMAC and PCIe nodes were overlooked.
Without dma-coherent, the kernel falls back to software cache maintenance for DMA operations, requiring explicit cache flushing and invalidating. This adds significant overhead that degrades performance in high-throughput workloads.
Add the missing dma-coherent properties to enable hardware coherency and avoid unnecessary software cache management overhead.
---
Hi Heiko,
This patch needs U-boot support which was added on Apr 15 2025 at least.
https://elixir.bootlin.com/u-boot/v2025.10/source/arch/arm/mach-rockchip/rk3576/rk3576.c#L156
Given that when the time USB3 and SATA were added, they set dma-coherent but without a CCI enabled U-boot, they were in fact broken due to no CCI support and no software cache maintenace when seeing dma-coherent. But there is no anyone complained about thes, so it should be ok that we don't need to bother ourselves.
arch/arm64/boot/dts/rockchip/rk3576.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/rockchip/rk3576.dtsi +4 -0
@@ -709,6 +709,7 @@ reset-names = "pwr", "pipe"; #address-cells = <3>; #size-cells = <2>; + dma-coherent; status = "disabled"; pcie0_intc: legacy-interrupt-controller {
@@ -763,6 +764,7 @@ reset-names = "pwr", "pipe"; #address-cells = <3>; #size-cells = <2>; + dma-coherent; status = "disabled"; pcie1_intc: legacy-interrupt-controller {
@@ -1709,6 +1711,7 @@ snps,mtl-rx-config = <&gmac0_mtl_rx_setup>; snps,mtl-tx-config = <&gmac0_mtl_tx_setup>; snps,tso; + dma-coherent; status = "disabled"; mdio0: mdio {
@@ -1756,6 +1759,7 @@ snps,mtl-rx-config = <&gmac1_mtl_rx_setup>; snps,mtl-tx-config = <&gmac1_mtl_tx_setup>; snps,tso; + dma-coherent; status = "disabled"; mdio1: mdio {
Signature · 7 lines
2.7.4 _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip
Quoted 6 lines · Shawn Lin
The RK3576 SoC employs ARM CCI for maintaining cache coherency between the CPU cluster and high-speed peripherals including USB3, SATA, GMAC, and PCIe controllers. While the USB3 and SATA controllers were correctly marked as dma-coherent, the GMAC and PCIe nodes were overlooked.
Quoted 8 lines
Without dma-coherent, the kernel falls back to software cache maintenance for DMA operations, requiring explicit cache flushing and invalidating. This adds significant overhead that degrades performance in high-throughput workloads.
Add the missing dma-coherent properties to enable hardware coherency and avoid unnecessary software cache management overhead.
Gentle ping... :)
Quoted 44 lines
Signed-off-by Shawn Lin <[email protected]>---
Hi Heiko,This patch needs U-boot support which was added on Apr 15 2025 at least.
https://elixir.bootlin.com/u-boot/v2025.10/source/arch/arm/mach-rockchip/rk3576/rk3576.c#L156Given that when the time USB3 and SATA were added, they set dma-coherent but without a CCI enabled U-boot, they were in fact broken due to no CCI support and no software cache maintenace when seeing dma-coherent. But there is no anyone complained about thes, so it should be ok that we don't need to bother ourselves.
arch/arm64/boot/dts/rockchip/rk3576.dtsi | 4 ++++ 1 file changed, 4 insertions(+)arch/arm64/boot/dts/rockchip/rk3576.dtsi +3
-0@@ -709,6 +709,7 @@ reset-names = "pwr", "pipe"; #address-cells = <3>; #size-cells = <2>; + dma-coherent; status = "disabled"; pcie0_intc: legacy-interrupt-controller {@@ -763,6 +764,7 @@ reset-names = "pwr", "pipe"; #address-cells = <3>; #size-cells = <2>; + dma-coherent; status = "disabled"; pcie1_intc: legacy-interrupt-controller {@@ -1709,6 +1711,7 @@ snps,mtl-rx-config = <&gmac0_mtl_rx_setup>; snps,mtl-tx-config = <&gmac0_mtl_tx_setup>; snps,tso; + dma-coherent; status = "disabled"; mdio0: mdio {
arch/arm64/boot/dts/rockchip/rk3576.dtsi line 1765
Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3576.dtsi +1
-0@@ -1756,6 +1759,7 @@ snps,mtl-rx-config = <&gmac1_mtl_rx_setup>; snps,mtl-tx-config = <&gmac1_mtl_tx_setup>; snps,tso; + dma-coherent; status = "disabled"; mdio1: mdio {
_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Quoted 6 lines · Shawn Lin
The RK3576 SoC employs ARM CCI for maintaining cache coherency between the CPU cluster and high-speed peripherals including USB3, SATA, GMAC, and PCIe controllers. While the USB3 and SATA controllers were correctly marked as dma-coherent, the GMAC and PCIe nodes were overlooked.
Quoted 6 lines
Without dma-coherent, the kernel falls back to software cache maintenance for DMA operations, requiring explicit cache flushing and invalidating. This adds significant overhead that degrades performance in high-throughput workloads.
[...]
Applied, thanks!
[1/1] arm64: dts: rockchip: add dma-coherent for pcie and gmac of RK3576
commit: 2d6fcdcaf42671dd3fb281d7a2e5ea985af11ce5
Best regards,
Signature · 6 lines
Heiko Stuebner <[email protected]> _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip