rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/5] Introduce bitfield and move register macro to rust/kernel/
@ 2025-10-03 15:47 Joel Fernandes
  2025-10-03 15:47 ` [PATCH v6 1/5] nova-core: bitfield: Move bitfield-specific code from register! into new macro Joel Fernandes
                   ` (6 more replies)
  0 siblings, 7 replies; 41+ messages in thread
From: Joel Fernandes @ 2025-10-03 15:47 UTC (permalink / raw)
  To: linux-kernel, rust-for-linux, dri-devel, dakr, acourbot
  Cc: Alistair Popple, Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
	bjorn3_gh, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross, David Airlie, Simona Vetter, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, John Hubbard, Joel Fernandes,
	Timur Tabi, joel, Elle Rhumsaa, Yury Norov, Daniel Almeida,
	Andrea Righi, nouveau

Hello!

These patches extract and enhance the bitfield support in the register macro in
nova to define Rust structures with bitfields. It then moves out the bitfield
support into the kenrel crate.

Since v5, I dropped several patches and only kept the simple ones that do code
movement, added a few features and added a KUNIT test. After Alex's bounded
integer [1] support is in, we can rewrite the dropped patches.

I also dropped the MAINTAINER entry for now, pending more clarity around that.
I am happy to maintain it, but I need more input on who all will co-maintain,
now that the last 4 patches were dropped. Perhaps we can maintain it was a part
of the core rust-for-linux? I suggest let us create the maintainer entry once
Alex's bounded integer support is integrated but I am open to suggestions.

Here are the v5 patches [2].

[1] https://lore.kernel.org/all/20251002-bounded_ints-v1-0-dd60f5804ea4@nvidia.com/
[2] https://lore.kernel.org/all/20250930144537.3559207-1-joelagnelf@nvidia.com/

Joel Fernandes (5):
  nova-core: bitfield: Move bitfield-specific code from register! into
    new macro
  nova-core: bitfield: Add support for different storage widths
  nova-core: bitfield: Add support for custom visiblity
  rust: Move register and bitfield macros out of Nova
  rust: bitfield: Add KUNIT tests for bitfield

 drivers/gpu/nova-core/falcon.rs               |   2 +-
 drivers/gpu/nova-core/falcon/gsp.rs           |   4 +-
 drivers/gpu/nova-core/falcon/sec2.rs          |   2 +-
 drivers/gpu/nova-core/regs.rs                 |   6 +-
 rust/kernel/bitfield.rs                       | 654 ++++++++++++++++++
 rust/kernel/io.rs                             |   1 +
 .../macros.rs => rust/kernel/io/register.rs   | 301 +-------
 rust/kernel/lib.rs                            |   1 +
 8 files changed, 696 insertions(+), 275 deletions(-)
 create mode 100644 rust/kernel/bitfield.rs
 rename drivers/gpu/nova-core/regs/macros.rs => rust/kernel/io/register.rs (73%)


base-commit: 299eb32863e584cfff7c6b667c3e92ae7d4d2bf9
-- 
2.34.1


^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2025-10-27 15:05 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-03 15:47 [PATCH v6 0/5] Introduce bitfield and move register macro to rust/kernel/ Joel Fernandes
2025-10-03 15:47 ` [PATCH v6 1/5] nova-core: bitfield: Move bitfield-specific code from register! into new macro Joel Fernandes
2025-10-06 17:56   ` Edwin Peer
2025-10-07  6:49     ` Alexandre Courbot
2025-10-03 15:47 ` [PATCH v6 2/5] nova-core: bitfield: Add support for different storage widths Joel Fernandes
2025-10-03 15:47 ` [PATCH v6 3/5] nova-core: bitfield: Add support for custom visiblity Joel Fernandes
2025-10-03 15:47 ` [PATCH v6 4/5] rust: Move register and bitfield macros out of Nova Joel Fernandes
2025-10-06 10:38   ` Alexandre Courbot
2025-10-09  6:59   ` Dirk Behme
2025-10-09 11:16     ` Danilo Krummrich
2025-10-09 11:28       ` Alexandre Courbot
2025-10-09 12:54         ` Danilo Krummrich
2025-10-10  7:28       ` Dirk Behme
2025-10-22 18:40   ` Beata Michalska
2025-10-22 19:37     ` Joel Fernandes
2025-10-23 13:55       ` Beata Michalska
2025-10-23 14:07         ` Danilo Krummrich
2025-10-23 21:47         ` Joel Fernandes
2025-10-23 21:50           ` Joel Fernandes
2025-10-27  9:06           ` Beata Michalska
2025-10-27  9:56             ` Danilo Krummrich
2025-10-27 15:05               ` Beata Michalska
2025-10-03 15:47 ` [PATCH v6 5/5] rust: bitfield: Add KUNIT tests for bitfield Joel Fernandes
2025-10-06 10:37   ` Alexandre Courbot
2025-10-06 19:38     ` Joel Fernandes
2025-10-06 20:36   ` [PATCH v7] " Joel Fernandes
2025-10-06 18:05 ` [PATCH v6 0/5] Introduce bitfield and move register macro to rust/kernel/ Edwin Peer
2025-10-06 22:29 ` Yury Norov
2025-10-07 10:36   ` Alexandre Courbot
2025-10-07 10:42     ` Miguel Ojeda
2025-10-07 13:20       ` Alexandre Courbot
2025-10-07 16:06         ` Yury Norov
2025-10-07 16:12         ` Miguel Ojeda
2025-10-07 13:16     ` Danilo Krummrich
2025-10-07 21:08       ` Joel Fernandes
2025-10-07 22:08         ` Danilo Krummrich
2025-10-08 14:28           ` Yury Norov
2025-10-08 15:00             ` Danilo Krummrich
2025-10-07 15:41     ` Yury Norov
2025-10-07 21:41       ` Daniel Almeida
2025-10-08 15:49         ` Yury Norov

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).