Re: [PATCH 0/6] rust: add `bitfield!` and `register!` macros
From: Danilo Krummrich
Date: Tue Jan 20 2026 - 10:27:59 EST
On Tue Jan 20, 2026 at 3:57 PM CET, Miguel Ojeda wrote:
> I want to make things easy for everyone, and I know there is pressure
> to deliver etc., but yeah... I am supposed to also push back when
> things get stretched a bit too much... :)
I think it would be good if drivers other than nova-core would finally be able
to use the register!() macro, rather than having to go with raw I/O operations.
> Having said that, depending on what the "local bitfield!" entails,
> i.e. how much of a hack/workaround/extra work it is, it may be best to
> avoid it and go directly for `bitfield!`.
I think it's just about pasting the current bitfield work into register.rs, such
that it can only be used from there. In a follow up we can work out how it
should turn out finally and have to patches: 1. introduce bitfield.rs and 2.
move register!() to use the code from bitfield.rs.
I also proposed that at the end of last cycle [1] because I think the two things
are mostly orthogonal and we don't need to stall register!() on the generic
bitfield work.
[1] https://lore.kernel.org/all/DDC49ZIRX79X.2Q4KW0UY7WUF3@xxxxxxxxxx/
> But for that to happen, we would need Linus to really do the -rc8, and
> very fast agreements and reviews on it.
The register!() macro code is worked on by Alex for about 10 month in nova-core,
the first RFC for general I/O infrastructure is from March 2025 and the current
series has been discussed on the list for about two cycles.
Given the above, that doesn't seem too unrealistic, let's see.
> It seems to me the easiest is that I give you a branch/tag for you
> (and others that want it) to merge with the `bitfield!` one next
> cycle. That would avoid the workaround too and Alexandre having to
> come up with another series etc.
You mean a tag with the bitfield!() code? Yeah, that would help if we don't make
it this cycle.