From: Florian Fainelli <f.fainelli@gmail.com>
To: Martin Kaistra <martin.kaistra@linutronix.de>,
Vladimir Oltean <olteanv@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Richard Cochran <richardcochran@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
John Stultz <john.stultz@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Stephen Boyd <sboyd@kernel.org>,
Russell King <linux@armlinux.org.uk>,
Marc Kleine-Budde <mkl@pengutronix.de>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH v2 0/7] Add PTP support for BCM53128 switch
Date: Tue, 9 Nov 2021 10:13:18 -0800 [thread overview]
Message-ID: <f88555e0-88b7-d01c-92ed-33729f704c4c@gmail.com> (raw)
In-Reply-To: <eb5836a7-fe08-7764-596b-f3941128f89c@linutronix.de>
On 11/9/21 3:13 AM, Martin Kaistra wrote:
>
>
> Am 09.11.21 um 11:39 schrieb Vladimir Oltean:
>> On Tue, Nov 09, 2021 at 10:50:02AM +0100, Martin Kaistra wrote:
>>> Ideally, for the B53=m case, I would have liked to include the PTP
>>> support in the b53_module itself, however I couldn't find a way to do
>>> that without renaming either the common source file or the module, which
>>> I didn't want to do.
>>>
>>> Instead, b53_ptp will be allowed as a loadable module, but only if
>>> b53_common is also a module, otherwise it will be built-in.
>>
>> Does this not work?
>>
>> obj-$(CONFIG_B53) += b53_common.o
>>
>> ifdef CONFIG_B53_PTP
>> b53_common-objs += b53_ptp.o
>> endif
>>
>> (haven't tried though)
>>
>
> I get:
>
> arm-linux-gnueabihf-ld -EL -r -o drivers/net/dsa/b53/b53_common.o
> drivers/net/dsa/b53/b53_ptp.o
>
>
>
> and
>
>
>
> ERROR: modpost: "b53_switch_register" [drivers/net/dsa/b53/b53_mdio.ko]
> undefined!
>
> ERROR: modpost: "b53_switch_alloc" [drivers/net/dsa/b53/b53_mdio.ko]
> undefined!
>
> ERROR: modpost: "b53_switch_register" [drivers/net/dsa/b53/b53_spi.ko]
> undefined!
>
> ERROR: modpost: "b53_switch_alloc" [drivers/net/dsa/b53/b53_spi.ko]
> undefined!
>
> It seems to me, that b53_common.c does not get included at all.
You need to play tricks with '-' and '_' and do something like this:
obj-$(CONFIG_B53) += b53-common.o
b53-common-objs += b53_common.o b53_ptp.o
and that should result in a b53-common.ko which would be accepted by
modprobe b53_common or b53-common AFAICT.
--
Florian
prev parent reply other threads:[~2021-11-09 18:13 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-09 9:50 [PATCH v2 0/7] Add PTP support for BCM53128 switch Martin Kaistra
2021-11-09 9:50 ` [PATCH v2 1/7] net: dsa: b53: Add BroadSync HD register definitions Martin Kaistra
2021-11-09 10:10 ` Kurt Kanzenbach
2021-11-09 18:04 ` Florian Fainelli
2021-11-10 8:19 ` Martin Kaistra
2021-11-09 9:50 ` [PATCH v2 2/7] net: dsa: b53: Move struct b53_device to include/linux/dsa/b53.h Martin Kaistra
2021-11-09 18:05 ` Florian Fainelli
2021-11-09 18:11 ` Florian Fainelli
2021-11-09 18:15 ` Vladimir Oltean
2021-11-09 18:20 ` Florian Fainelli
2021-11-09 18:49 ` Vladimir Oltean
2021-11-09 9:50 ` [PATCH v2 3/7] timecounter: allow for non-power of two overflow Martin Kaistra
2021-11-24 20:55 ` Thomas Gleixner
2021-11-09 9:50 ` [PATCH v2 4/7] net: dsa: b53: Add PHC clock support Martin Kaistra
2021-11-09 18:08 ` Florian Fainelli
2021-11-09 9:50 ` [PATCH v2 5/7] net: dsa: b53: Add logic for RX timestamping Martin Kaistra
2021-11-09 18:07 ` Florian Fainelli
2021-11-10 8:43 ` Martin Kaistra
2021-11-09 9:50 ` [PATCH v2 6/7] net: dsa: b53: Add logic for TX timestamping Martin Kaistra
2021-11-09 11:12 ` Vladimir Oltean
2021-11-10 7:14 ` Kurt Kanzenbach
2021-11-10 13:05 ` Vladimir Oltean
2021-11-10 13:30 ` Vladimir Oltean
2021-11-10 13:47 ` Kurt Kanzenbach
2021-11-10 14:00 ` Vladimir Oltean
2021-11-10 15:08 ` Richard Cochran
2021-11-10 15:23 ` Vladimir Oltean
2021-11-10 12:57 ` Vladimir Oltean
2021-11-09 9:50 ` [PATCH v2 7/7] net: dsa: b53: Expose PTP timestamping ioctls to userspace Martin Kaistra
2021-11-09 10:39 ` [PATCH v2 0/7] Add PTP support for BCM53128 switch Vladimir Oltean
2021-11-09 11:13 ` Martin Kaistra
2021-11-09 18:13 ` Florian Fainelli [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=f88555e0-88b7-d01c-92ed-33729f704c4c@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=john.stultz@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=martin.kaistra@linutronix.de \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=richardcochran@gmail.com \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
--cc=vivien.didelot@gmail.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 NNTP newsgroup(s).