[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250908201405.GA3815232@joelbox2>
Date: Mon, 8 Sep 2025 16:14:05 -0400
From: Joel Fernandes <joelagnelf@...dia.com>
To: Alexandre Courbot <acourbot@...dia.com>
Cc: linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
dakr@...nel.org, Alistair Popple <apopple@...dia.com>,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
bjorn3_gh@...tonmail.com, Benno Lossin <lossin@...nel.org>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
John Hubbard <jhubbard@...dia.com>, Timur Tabi <ttabi@...dia.com>,
joel@...lfernandes.org, Elle Rhumsaa <elle@...thered-steel.dev>,
Daniel Almeida <daniel.almeida@...labora.com>,
nouveau@...ts.freedesktop.org, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v2 4/4] rust: Move register and bitstruct macros out of
Nova
On Mon, Sep 08, 2025 at 12:52:57PM +0900, Alexandre Courbot wrote:
> On Thu Sep 4, 2025 at 6:54 AM JST, Joel Fernandes wrote:
> > Out of broad need for these macros in Rust, move them out. Several folks
> > have shown interest (Nova, Tyr GPU drivers).
> >
> > bitstruct - defines bitfields in Rust structs similar to C.
> > register - support for defining hardware registers and accessors.
> >
> > Signed-off-by: Joel Fernandes <joelagnelf@...dia.com>
> <snip>
>
> > diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs
> > index c859a8984bae..9c492fa10967 100644
> > --- a/rust/kernel/lib.rs
> > +++ b/rust/kernel/lib.rs
> > @@ -64,6 +64,7 @@
> > #[cfg(CONFIG_AUXILIARY_BUS)]
> > pub mod auxiliary;
> > pub mod bits;
> > +pub mod bitstruct;
> > #[cfg(CONFIG_BLOCK)]
> > pub mod block;
> > pub mod bug;
> > @@ -112,6 +113,7 @@
> > pub mod prelude;
> > pub mod print;
> > pub mod rbtree;
> > +pub mod register;
>
> I remember a discussion with Danilo where he mentioned the register
> macro should end up being in `kernel::io::register`.
I talked with Danilo, and I moved it to io for next revision.
> Also wondering whether `bitstruct` should not be in the
> appropriately-named `bits` module standing right above it. :)
I think now that I renamed it to bitfield, I'll move it to bits. That does
make a lot of sense.
thanks,
- Joel
Powered by blists - more mailing lists