[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNAR30BJMghaJz9V6dY_gckZo=EOxh_ima7KjMgWSdhZgBA@mail.gmail.com>
Date: Thu, 24 Nov 2022 05:37:15 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Alexander Lobakin <alobakin@...me>
Cc: linux-kbuild@...r.kernel.org, Nicolas Schier <nicolas@...sle.eu>,
Jens Axboe <axboe@...nel.dk>,
Boris Brezillon <bbrezillon@...nel.org>,
Borislav Petkov <bp@...en8.de>,
Tony Luck <tony.luck@...el.com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Vladimir Oltean <vladimir.oltean@....com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Derek Chickles <dchickles@...vell.com>,
Ioana Ciornei <ioana.ciornei@....com>,
Salil Mehta <salil.mehta@...wei.com>,
Sunil Goutham <sgoutham@...vell.com>,
Grygorii Strashko <grygorii.strashko@...com>,
Daniel Scally <djrscally@...il.com>,
Hans de Goede <hdegoede@...hat.com>,
Mark Brown <broonie@...nel.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
NXP Linux Team <linux-imx@....com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 18/18] net: cpsw: fix mixed module-builtin object
On Sun, Nov 20, 2022 at 8:11 AM Alexander Lobakin <alobakin@...me> wrote:
>
> Apart from cpdma, there are 4 object files shared in one way or
> another by 5 modules:
>
> > scripts/Makefile.build:252: ./drivers/net/ethernet/ti/Makefile:
> > cpsw_ale.o is added to multiple modules: keystone_netcp
> > keystone_netcp_ethss ti_cpsw ti_cpsw_new
> > scripts/Makefile.build:252: ./drivers/net/ethernet/ti/Makefile:
> > cpsw_ethtool.o is added to multiple modules: ti_cpsw ti_cpsw_new
> > scripts/Makefile.build:252: ./drivers/net/ethernet/ti/Makefile:
> > cpsw_priv.o is added to multiple modules: ti_cpsw ti_cpsw_new
> > scripts/Makefile.build:252: ./drivers/net/ethernet/ti/Makefile:
> > cpsw_sl.o is added to multiple modules: ti_cpsw ti_cpsw_new
>
> All of those five are tristate, that means with some of the
> corresponding Kconfig options set to `m` and some to `y`, the same
> objects are linked to a module and also to vmlinux even though the
> expected CFLAGS are different between builtins and modules.
> This is the same situation as fixed by
> commit 637a642f5ca5 ("zstd: Fixing mixed module-builtin objects").
> There's also no need to duplicate the same code 4 x 5 = roughly 20
> times.
>
> Introduce the new module, ti_cpsw_core, to provide the common
> functions used by all those modules.
>
> Fixes: 16f54164828b ("net: ethernet: ti: cpsw: drop CONFIG_TI_CPSW_ALE config option")
> Fixes: a8577e131266 ("net: ethernet: ti: netcp_ethss: fix build")
> Fixes: ed3525eda4c4 ("net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac")
> Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
> Suggested-by: Masahiro Yamada <masahiroy@...nel.org>
> Signed-off-by: Alexander Lobakin <alobakin@...me>
> ---
> drivers/net/ethernet/ti/Kconfig | 11 ++++++--
> drivers/net/ethernet/ti/Makefile | 12 ++++----
> drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 ++
> drivers/net/ethernet/ti/cpsw.c | 1 +
> drivers/net/ethernet/ti/cpsw_ale.c | 20 +++++++++++++
> drivers/net/ethernet/ti/cpsw_ethtool.c | 24 ++++++++++++++++
> drivers/net/ethernet/ti/cpsw_new.c | 1 +
> drivers/net/ethernet/ti/cpsw_priv.c | 36 ++++++++++++++++++++++++
> drivers/net/ethernet/ti/cpsw_sl.c | 8 ++++++
> drivers/net/ethernet/ti/netcp_core.c | 2 ++
> drivers/net/ethernet/ti/netcp_ethss.c | 2 ++
> 11 files changed, 112 insertions(+), 7 deletions(-)
As I commented on 09/18,
maybe 09/18 and 18/18 can be merged.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists