[PATCH net-next v2 1/7] net: stmmac: provide plat_dat->dma_cfg in stmmac_plat_dat_alloc()
Mohd Ayaan Anwar
mohd.anwar at oss.qualcomm.com
Mon Mar 9 04:08:12 PDT 2026
On Mon, Mar 09, 2026 at 09:39:18AM +0000, Russell King (Oracle) wrote:
> 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 at armlinux.org.uk>
> ---
Reviewed-by: Mohd Ayaan Anwar <mohd.anwar at oss.qualcomm.com>
Ayaan
More information about the Linux-mediatek
mailing list