From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6633A1862A; Tue, 1 Jul 2025 03:43:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751341401; cv=none; b=jNf+P46mnkm3SKfKr5p51ssggVLZlTiAJf/8bmSmxNqg7xLSQgQ3+tL4biPiVVmpL4b1N07DqUAmXgxJkxs6Q+GejjdHeWwG52Dm6VWUm0cVuli0dm6fITtDTogtON3q1tM3DRsKRLwi5ioR+1emJwH8IEIY2nQAHjMXAyztJbc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751341401; c=relaxed/simple; bh=iVNh8aIhXLNmcR6kEfw10ctuzfsid98qCR5uOaZr0nM=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hu4pStvyoefTt4UO4Xsnzv5RZlJnDf9AuSwARYkivhA7a3DeRFxeguGuBXT2iJv9TJsI1CwPpKh3tSvHslcCRT/Z3MMCHmPIOvDH3x0e6BedpOZufWV6vwxIVHluKRHqIB03yEEIQ1xxS/UO7+GMkh+/rHgo9hbdPxonafOdttQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.98.2) (envelope-from ) id 1uWRtf-000000008Tg-49Ij; Tue, 01 Jul 2025 03:43:04 +0000 Date: Tue, 1 Jul 2025 04:42:55 +0100 From: Daniel Golle To: Felix Fietkau , Frank Wunderlich , Eric Woudstra , Elad Yifee , Bo-Cun Chen , Sky Huang , Sean Wang , Lorenzo Bianconi , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH net-next v3 3/3] net: ethernet: mtk_eth_soc: use genpool allocator for SRAM Message-ID: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 > Signed-off-by: Frank Wunderlich > Signed-off-by: Daniel Golle > --- > 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.