]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: dts: rockchip: add dma-coherent for pcie and gmac of RK3576
authorShawn Lin <shawn.lin@rock-chips.com>
Fri, 28 Nov 2025 07:09:22 +0000 (15:09 +0800)
committerHeiko Stuebner <heiko@sntech.de>
Mon, 22 Dec 2025 13:28:54 +0000 (14:28 +0100)
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.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Link: https://patch.msgid.link/1764313762-78063-1-git-send-email-shawn.lin@rock-chips.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm64/boot/dts/rockchip/rk3576.dtsi

index a86fc6b4e8c4581c30ba9bd915d9e4cbc2c14c0a..792857aee4f7a3d07b33555b8ba00e09b54f4065 100644 (file)
                                      "aclk_dbi", "pclk",
                                      "aux";
                        device_type = "pci";
+                       dma-coherent;
                        interrupts = <GIC_SPI 281 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 282 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 279 IRQ_TYPE_LEVEL_HIGH>,
                                      "aclk_dbi", "pclk",
                                      "aux";
                        device_type = "pci";
+                       dma-coherent;
                        interrupts = <GIC_SPI 267 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>,
                        clock-names = "stmmaceth", "clk_mac_ref",
                                      "pclk_mac", "aclk_mac",
                                      "ptp_ref";
+                       dma-coherent;
                        interrupts = <GIC_SPI 293 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 298 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "macirq", "eth_wake_irq";
                        clock-names = "stmmaceth", "clk_mac_ref",
                                      "pclk_mac", "aclk_mac",
                                      "ptp_ref";
+                       dma-coherent;
                        interrupts = <GIC_SPI 301 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 306 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "macirq", "eth_wake_irq";