Re: [PATCH v5 5/7] rust: io: add `register!` macro

From: Danilo Krummrich

Date: Fri Feb 06 2026 - 14:05:13 EST


On Thu Jan 29, 2026 at 2:32 PM CET, Alexandre Courbot wrote:
> Add a macro for defining hardware register types with I/O accessors.
>
> Each register field is represented as a `Bounded` of the appropriate bit
> width, ensuring field values are never silently truncated.
>
> Fields can optionally be converted to/from custom types, either fallibly
> or infallibly.
>
> The address of registers can be direct, relative, or indexed, supporting
> most of the patterns in which registers are arranged.
>
> Tested-by: Dirk Behme <dirk.behme@xxxxxxxxxxxx>
> Signed-off-by: Alexandre Courbot <acourbot@xxxxxxxxxx>

Suggested-by: Danilo Krummrich <dakr@xxxxxxxxxx>
Link: https://docs.kernel.org/gpu/nova/core/todo.html#generic-register-abstraction-rega

I assume you will remove this task once we land your nova-core patch that uses
the register!() macro, so maybe this link makes more sense:

Link: https://lore.kernel.org/all/20250306222336.23482-6-dakr@xxxxxxxxxx/