[PATCH net-next v3 3/3] net: ethernet: mtk_eth_soc: use genpool allocator for SRAM
Daniel Golle
daniel at makrotopia.org
Mon Jun 30 20:42:55 PDT 2025
On Mon, Jun 30, 2025 at 10:47:02PM +0100, Daniel Golle wrote:
> Use a dedicated "mmio-sram" and the genpool allocator instead of
> open-coding SRAM allocation for DMA rings.
> Keep support for legacy device trees but notify the user via a
> warning to update.
>
> Co-developed-by: Frank Wunderlich <frank-w at public-files.de>
> Signed-off-by: Frank Wunderlich <frank-w at public-files.de>
> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
> ---
> v3: fix resource leak on error in mtk_probe()
> v2: fix return type of mtk_dma_ring_alloc() in case of error
>
> drivers/net/ethernet/mediatek/mtk_eth_soc.c | 117 +++++++++++++-------
> drivers/net/ethernet/mediatek/mtk_eth_soc.h | 4 +-
> 2 files changed, 83 insertions(+), 38 deletions(-)
>
I just noticed I forgot to 'git add' the Kconfig change adding 'select
GENERIC_ALLOCATOR' for NET_MEDIATEK_SOC... I will include that in v4 and
also add a patch dropping the open coded static partitioning of the SRAM
in favor of always using the gen_pool allocator even with legacy device
trees.
Meanwhile I would still be thankful to see this patch reviewed as apart
from the Kconfig addition it won't change.
More information about the Linux-mediatek
mailing list