[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z5Nw8kaieLueWyUu@pollux>
Date: Fri, 24 Jan 2025 11:52:34 +0100
From: Danilo Krummrich <dakr@...nel.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Lyude Paul <lyude@...hat.com>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org,
Maíra Canal <mairacanal@...eup.net>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>
Subject: Re: [PATCH 2/2] rust/kernel: Add platform::ModuleDevice
On Thu, Jan 23, 2025 at 03:17:23PM +0100, Greg Kroah-Hartman wrote:
> On Thu, Jan 23, 2025 at 11:21:28AM +0100, Danilo Krummrich wrote:
> > On Thu, Jan 23, 2025 at 07:23:08AM +0100, Greg Kroah-Hartman wrote:
> > > On Wed, Jan 22, 2025 at 06:49:22PM -0500, Lyude Paul wrote:
> > > > A number of kernel modules work with virtual devices, where being virtual
> > > > implies that there's no physical device to actually be plugged into the
> > > > system. Because of that, such modules need to be able to manually
> > > > instantiate a kernel device themselves - which can then be probed in the
> > > > same manner as any other kernel device.
> > > >
> > > > This adds support for such a usecase by introducing another platform device
> > > > type, ModuleDevice. This type is interchangeable with normal platform
> > > > devices, with the one exception being that it controls the lifetime of the
> > > > registration of the device.
> > >
> > > Sorry, but a "virtual" device is NOT a platform device at all. Platform
> > > devices are things that are not on a real bus and are described by
> > > firmware somehow.
> > >
> > > The kernel has "virtual" devices today just fine, look at
> > > /sys/devices/virtual/ so why not just use that api instead of making up
> > > something new?
> >
> > I think we briefly discussed this in another mail thread [1] for the example of
> > the vKMS driver [2] in the past.
> >
> > In [1] you mentioned that with the virtual device API, things are a bit
> > inconvenient and that you want to follow up on this.
>
> And my intern ended up doing other things last summer and never got to
> this, sorry. I've not had the time either. Let me try to get to it
> next week, but no promises...
>
> But that doesn't excuse the abuse of platform devices, that's not ok,
> and I'm not going to want to take this change at all, sorry.
It does not, indeed. That's not what I wanted to imply.
I brought it up to see if there has been any progress already that can be built
upon.
Powered by blists - more mailing lists