[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2023100317-glory-unbounded-af5c@gregkh>
Date: Tue, 3 Oct 2023 08:31:38 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: FUJITA Tomonori <fujita.tomonori@...il.com>
Cc: andrew@...n.ch, miguel.ojeda.sandonis@...il.com, netdev@...r.kernel.org,
rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v1 1/3] rust: core abstractions for network PHY drivers
On Tue, Oct 03, 2023 at 12:43:11PM +0900, FUJITA Tomonori wrote:
> On Tue, 3 Oct 2023 03:40:50 +0200
> Andrew Lunn <andrew@...n.ch> wrote:
>
> > On Tue, Oct 03, 2023 at 09:33:38AM +0900, FUJITA Tomonori wrote:
> >> On Mon, 2 Oct 2023 16:52:45 +0200
> >> Andrew Lunn <andrew@...n.ch> wrote:
> >>
> >> >> +//! Networking.
> >> >> +
> >> >> +#[cfg(CONFIG_PHYLIB)]
> >> >
> >> > I brought this up on the rust for linux list, but did not get a answer
> >> > which convinced me.
> >>
> >> Sorry, I overlooked that discussion.
> >>
> >>
> >> > Have you tried building this with PHYLIB as a kernel module?
> >>
> >> I've just tried and failed to build due to linker errors.
> >>
> >>
> >> > My understanding is that at the moment, this binding code is always
> >> > built in. So you somehow need to force phylib core to also be builtin.
> >>
> >> Right. It means if you add Rust bindings for a subsystem, the
> >> subsystem must be builtin, cannot be a module. I'm not sure if it's
> >> acceptable.
> >
> > You just need Kconfig in the Rust code to indicate it depends on
> > PHYLIB. Kconfig should then remove the option to build the phylib core
> > as a module. And that is acceptable.
>
> The following works. If you set the phylib as a module, the rust
> option isn't available.
That does not seem wise. Why not make the binding a module as well?
thanks,
greg k-h
Powered by blists - more mailing lists