]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: stmmac: provide plat_dat->dma_cfg in stmmac_plat_dat_alloc()
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Mon, 9 Mar 2026 09:39:18 +0000 (09:39 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 11 Mar 2026 02:54:06 +0000 (19:54 -0700)
commit7a6387dec8cee5a237dc5092269e97028f5a983b
treea694e7c7214b72efeb01f51ee7a9f3261c5ce0b8
parent1a6ca6497a40f5c7795575a35f0da7d013b79bdd
net: stmmac: provide plat_dat->dma_cfg in stmmac_plat_dat_alloc()

plat_dat->dma_cfg is unconditionally required for the operation of the
driver, so it would make sense to allocate it along with the plat_dat.

On Arm64, sizeof(*plat_dat) has recently shrunk from 880 to 816 bytes
and sizeof(*plat_dat->dma_cfg) has shrunk from 32 to 20 bytes.

Given that dma_cfg is required, and it is now less than a cache line,
It doesn't make sense to allocate this separateny, so place it at the
end of struct plat_stmmacenet_data, and set plat_dat->dma_cfg to point
at that to avoid mass changes.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
Link: https://patch.msgid.link/E1vzX54-0000000CVrw-2jfu@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
drivers/net/ethernet/stmicro/stmmac/dwmac-motorcomm.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
include/linux/stmmac.h