From: Paolo Abeni <pabeni@redhat.com>
To: Arnd Bergmann <arnd@kernel.org>, Jakub Kicinski <kuba@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Siddharth Vadapalli <s-vadapalli@ti.com>,
Ravi Gunasekaran <r-gunasekaran@ti.com>,
Roger Quadros <rogerq@kernel.org>,
MD Danish Anwar <danishanwar@ti.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
Diogo Ivo <diogo.ivo@siemens.com>, Tanmay Patil <t-patil@ti.com>,
Simon Horman <horms@kernel.org>,
Ratheesh Kannoth <rkannoth@marvell.com>,
Grygorii Strashko <grygorii.strashko@ti.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-omap@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH 1/2] [v2] net: ethernet: ti-cpsw: fix linking built-in code to modules
Date: Thu, 18 Apr 2024 15:34:06 +0200 [thread overview]
Message-ID: <0891a0eeea4d771fd8c9760bfc1fcedf4b2d56db.camel@redhat.com> (raw)
In-Reply-To: <20240417084400.3034104-1-arnd@kernel.org>
On Wed, 2024-04-17 at 10:43 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> There are six variants of the cpsw driver, sharing various parts of
> the code: davinci-emac, cpsw, cpsw-switchdev, netcp, netcp_ethss and
> am65-cpsw-nuss.
>
> I noticed that this means some files can be linked into more than
> one loadable module, or even part of vmlinux but also linked into
> a loadable module, both of which mess up assumptions of the build
> system.
>
> Change this back to having separate modules for each portion that
> can be linked standalone, exporting symbols as needed:
>
> - ti-cpsw-common.ko now contains both cpsw-common.o and
> davinci_cpdma.o as they are always used together
>
> - ti-cpsw-priv.ko contains cpsw_priv.o, cpsw_sl.o and cpsw_ethtool.o,
> which are the core of the cpsw and cpsw-new drivers.
>
> - ti-cpsw-sl.ko contains the cpsw-sl.o object and is used on
> ti-am65-cpsw-nuss.ko in addition to the two other cpsw variants.
>
> - ti-cpsw-ale.o is the one standalone module that is used by all
> except davinci_emac.
>
> Each of these will be built-in if any of its users are built-in,
> otherwise it's a loadable module if there is at least one module
> using it. I did not bring back the separate Kconfig symbols for
> this, but just handle it using Makefile logic.
>
> Note: ideally this is something that Kbuild complains about, but
> usually we just notice when something using THIS_MODULS misbehaves
> in a way that a user notices.
>
> Fixes: 99f6297182729 ("net: ethernet: ti: cpsw: drop TI_DAVINCI_CPDMA config option")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> v2: rebase on top of v6.9-rc
Does not apply cleanly to net (nor to net-next FWIW).
You should rebase on top of:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/ main
Also, please don't send patches targeting the net and net-next trees in
the same series. If the net-next patch depends on the net one, you have
to wait until the first is applied and the 'net' tree is merged back
into the 'net-next' tree before submitting the latter (usually after
the next thu).
Thanks,
Paolo
prev parent reply other threads:[~2024-04-18 13:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 8:43 [PATCH 1/2] [v2] net: ethernet: ti-cpsw: fix linking built-in code to modules Arnd Bergmann
2024-04-17 11:49 ` Alexander Lobakin
2024-04-17 12:07 ` Arnd Bergmann
2024-04-17 12:14 ` Arnd Bergmann
2024-04-18 13:34 ` Paolo Abeni [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0891a0eeea4d771fd8c9760bfc1fcedf4b2d56db.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=diogo.ivo@siemens.com \
--cc=edumazet@google.com \
--cc=grygorii.strashko@ti.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=r-gunasekaran@ti.com \
--cc=rkannoth@marvell.com \
--cc=rogerq@kernel.org \
--cc=s-vadapalli@ti.com \
--cc=t-patil@ti.com \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).