Skip to content

Introduce bitfield and move register macro to rust/kernel/

Joel Fernandes dri-devel lkml nouveau rust-for-linux 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest5 patches 37 repliesIn review
  2. v59 patches 17 repliesSuperseded
  3. v46 patches 37 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v35 patches13 repliesSuperseded
v24 patches25 repliesSuperseded

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5nova-core: bitfield: Move bitfield-specific code from register! into new macrodrivers/gpu/nova-core/bitfield.rs drivers/gpu/nova-core/nova_core.rs drivers/gpu/nova-core/regs/macros.rs+329 -2492 replies
2/5nova-core: bitfield: Add support for different storage widthsdrivers/gpu/nova-core/bitfield.rs drivers/gpu/nova-core/regs/macros.rs+46 -350 replies
3/5nova-core: bitfield: Add support for custom visiblitydrivers/gpu/nova-core/bitfield.rs drivers/gpu/nova-core/regs/macros.rs+34 -310 replies
4/5rust: Move register and bitfield macros out of Novadrivers/gpu/nova-core/falcon.rs drivers/gpu/nova-core/falcon/gsp.rs drivers/gpu/nova-core/falcon/sec2.rs +6 more+54 -5018 replies
5/5rust: bitfield: Add KUNIT tests for bitfieldrust/kernel/bitfield.rs+323 -03 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAlexandre CourbotElle RhumsaaEdwin Peer
SeriesR-b
1/5R-b R-b
2/5R-b R-b
3/5R-b R-b
4/5R-b R-b
5/5R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v6 thread

Cover letter [PATCH v6 0/5] Introduce bitfield and move register macro to rust/kernel/

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/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/

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

Signature · 1 line
2.34.1