All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: FUJITA Tomonori <fujita.tomonori@gmail.com>
Cc: andrew@lunn.ch, miguel.ojeda.sandonis@gmail.com,
	netdev@vger.kernel.org, rust-for-linux@vger.kernel.org
Subject: Re: [PATCH v1 1/3] rust: core abstractions for network PHY drivers
Date: Tue, 3 Oct 2023 08:31:38 +0200	[thread overview]
Message-ID: <2023100317-glory-unbounded-af5c@gregkh> (raw)
In-Reply-To: <20231003.124311.1007471622916115559.fujita.tomonori@gmail.com>

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@lunn.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@lunn.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

  reply	other threads:[~2023-10-03  6:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-02  8:52 [PATCH v1 0/3] Rust abstractions for network PHY drivers FUJITA Tomonori
2023-10-02  8:53 ` [PATCH v1 1/3] rust: core " FUJITA Tomonori
2023-10-02  9:14   ` Greg KH
2023-10-02 14:52   ` Andrew Lunn
2023-10-03  0:33     ` FUJITA Tomonori
2023-10-03  1:40       ` Andrew Lunn
2023-10-03  3:43         ` FUJITA Tomonori
2023-10-03  6:31           ` Greg KH [this message]
2023-10-03  6:40             ` FUJITA Tomonori
2023-10-03 12:45               ` Andrew Lunn
2023-10-02 15:24   ` Andrew Lunn
2023-10-03 23:46     ` FUJITA Tomonori
2023-10-02  8:53 ` [PATCH v1 2/3] MAINTAINERS: add Rust PHY abstractions to the ETHERNET PHY LIBRARY FUJITA Tomonori
2023-10-02  8:53 ` [PATCH v1 3/3] net: phy: add Rust Asix PHY driver FUJITA Tomonori

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=2023100317-glory-unbounded-af5c@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=andrew@lunn.ch \
    --cc=fujita.tomonori@gmail.com \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.