From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BBE8FC001CC for ; Wed, 17 Apr 2024 21:09:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DIaldONjm2mHjzT0cipZIPsZAHbps0vHzni9HXoaa6I=; b=2tBURqm4iYJD0r OZY6dOmgtOwXFG9eXomSghu/kYq9Ot4wRpVQenRZ7AYvbPBeEsHerc4lsm4CBbaFTYYuUSaZzof5m SJlnTt/Od7HOd/9apJiUfJISrmOt9Ezql6Hw4XM4EU/48i0xTJJP2zYjPtrOAIGVt8h02zBsI3ZKx SQ4+bj8Idz7kPrTaI4d5OyzkGrDmpwtVoucIBn5saSRFC7Vu4TuIiyP0c5sIyYXEDR5kVIQinUXYj iUnnJ65lMR/Ab6G2/ShD0Hh8Qnql8fhkRuBiDgrPiINPEMuHDDp8v5r9OMvuOGztpxfDeN7WmdmEf 2aYGHz+SX/b0Y6W3iIMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxCXL-000000001xR-0OcX; Wed, 17 Apr 2024 21:09:47 +0000 Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxCXH-000000001tL-1Ppz for linux-arm-kernel@lists.infradead.org; Wed, 17 Apr 2024 21:09:45 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 81C3CE0002; Wed, 17 Apr 2024 21:09:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1713388172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O2m8pR1pCbDPDT8QEV6rLd8e1/9F0K8J7acfuqFf7QA=; b=kK0azEzbFnTcYp++AYAcjqBoyE8TnPGCbJAfTbtuRI20udyuLFdbvG1CBUKlAuDGpaG2Kt zg63AxtFeeVgPhYzLL5gG5uv3PZLMLqokImt9vTn8Za2vY/8ByTJ3aPiqrF6rp3H0qGLsc 6q/XTnohHTblzYoauX2Bfr1Py7DIMZCWDjFyH4poEMHZ83FctP7+Hoh5ewNJaam4Sut+Lv AvSvOp2Z1TpJvrXkPMc0wcpSfQadLq6Mwr80gLu78ieEG45l4rTSt3sUmGWv1+Xr61QS1p oM8ddfBZBBtASlEi8SlnjZC/E8UpusTmgJGiPem6H8cmHf6dwPt7B7Fb5eK90w== Date: Wed, 17 Apr 2024 23:09:20 +0200 From: Maxime Chevallier To: Nathan Chancellor Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Russell King , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Herve Codina , Florian Fainelli , Heiner Kallweit , Vladimir Oltean , =?UTF-8?B?S8O2cnk=?= Maincent , Jesse Brandeburg , Marek =?UTF-8?B?QmVow7pu?= , Piergiorgio Beruto , Oleksij Rempel , =?UTF-8?B?Tmljb2zDsg==?= Veronese , Simon Horman , mwojtas@chromium.org, Antoine Tenart Subject: Re: [PATCH net-next] net: phy: link_topology: Don't stub-away the topology creation Message-ID: <20240417230920.054d8803@fedora> In-Reply-To: <20240417180721.GA3212605@dev-arch.thelio-3990X> References: <20240417142707.2082523-1-maxime.chevallier@bootlin.com> <20240417180721.GA3212605@dev-arch.thelio-3990X> Organization: Bootlin X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-redhat-linux-gnu) MIME-Version: 1.0 X-GND-Sasl: maxime.chevallier@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240417_140943_833121_06AC0536 X-CRM114-Status: GOOD ( 27.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello Nathan, On Wed, 17 Apr 2024 11:07:21 -0700 Nathan Chancellor wrote: > Hi Maxime, > > On Wed, Apr 17, 2024 at 04:27:05PM +0200, Maxime Chevallier wrote: > > Some of the phy_link_topology operations are protected by IS_REACHABLE, > > which can lead to scenarios where the consumer, built as modules, sees the topology > > unstubbed, whereas the initialization didn't occur. > > > > Don't stub away the creation of the topology, it has no dependency on > > any other parts like phylib, so we can make it always available. > > > > Signed-off-by: Maxime Chevallier > > Closes: https://lore.kernel.org/netdev/2e11b89d-100f-49e7-9c9a-834cc0b82f97@gmail.com/ > > Closes: https://lore.kernel.org/netdev/20240409201553.GA4124869@dev-arch.thelio-3990X/ > > --- > > Hi Nathan, Heiner, > > > > I'm currently at EOSS, so I'm sending this patch without having been > > able to properly test it (build-tested only), but as this addresses an > > issue for people using -next, I'm sending this anyway, sorry about that. > > No worries, thanks for continuing to take a look. Unfortunately, this > patch fails to build during the linking stage for me with my > configuration: > > x86_64-linux-ld: vmlinux.o: in function `free_netdev': > net/core/dev.c:11060:(.text+0xb14030): undefined reference to `phy_link_topo_destroy' > x86_64-linux-ld: vmlinux.o: in function `alloc_netdev_mqs': > net/core/dev.c:10966:(.text+0xb142d6): undefined reference to `phy_link_topo_create' Heh serves me well for trying to go too fast :) phy_link_topo_create then need to compile unconditionally, so I'm indeed missing some bits here. Thanks a lot for testing, Maxime > > > Hopefully it can address the issue for now, I haven't given-up on your > > idea to introduce a config option Heiner :) > > > > Thanks, > > > > Maxime > > > > include/linux/phy_link_topology_core.h | 15 --------------- > > 1 file changed, 15 deletions(-) > > > > diff --git a/include/linux/phy_link_topology_core.h b/include/linux/phy_link_topology_core.h > > index 0a6479055745..61e2592f24ac 100644 > > --- a/include/linux/phy_link_topology_core.h > > +++ b/include/linux/phy_link_topology_core.h > > @@ -4,22 +4,7 @@ > > > > struct phy_link_topology; > > > > -#if IS_REACHABLE(CONFIG_PHYLIB) > > - > > struct phy_link_topology *phy_link_topo_create(struct net_device *dev); > > void phy_link_topo_destroy(struct phy_link_topology *topo); > > > > -#else > > - > > -static inline struct phy_link_topology *phy_link_topo_create(struct net_device *dev) > > -{ > > - return NULL; > > -} > > - > > -static inline void phy_link_topo_destroy(struct phy_link_topology *topo) > > -{ > > -} > > - > > -#endif > > - > > #endif /* __PHY_LINK_TOPOLOGY_CORE_H */ > > -- > > 2.44.0 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel