Re: [PATCH v6 2/2] gpu: nova-core: add task for device address type wrappers

From: Danilo Krummrich

Date: Tue Apr 28 2026 - 19:03:50 EST


On Sat Apr 11, 2026 at 4:41 AM CEST, John Hubbard wrote:
> Add a todo.rst entry for creating newtype wrappers around integer types
> for device addresses and sizes, with a marker trait that generic DRM
> APIs can use as a bound.
>
> Suggested-by: Danilo Krummrich <dakr@xxxxxxxxxx>
> Signed-off-by: John Hubbard <jhubbard@xxxxxxxxxx>
> ---
> Documentation/gpu/nova/core/todo.rst | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/Documentation/gpu/nova/core/todo.rst b/Documentation/gpu/nova/core/todo.rst
> index d5130b2b08fb..595a94e9ee2e 100644
> --- a/Documentation/gpu/nova/core/todo.rst
> +++ b/Documentation/gpu/nova/core/todo.rst

I think this fits better in Documentation/gpu/todo.rst and the Rust for Linux
issue tracker.

> @@ -88,6 +88,20 @@ SR-IOV [1] is work in progress.
> | Complexity: Beginner
> | Link: https://lore.kernel.org/all/20251119-rust-pci-sriov-v1-0-883a94599a97@xxxxxxxxxx/ [1]
>
> +Device address type wrappers
> +----------------------------
> +
> +The ``SizeConstants`` trait provides ``SZ_*`` constants as associated constants
> +on ``u32``, ``u64``, and ``usize``. Device-centric APIs such as GPU VM
> +management and buddy allocators could benefit from newtype wrappers around these
> +integer types to represent device addresses and sizes. A separate marker trait
> +could then serve as a generic bound for those wrappers.
> +
> +| Complexity: Intermediate
> +| Link: https://lore.kernel.org/all/DHJJJNP5T5FZ.2HWBMOEEKH9ZR@xxxxxxxxxx/
> +| Contact: Danilo Krummrich
> +
> +
> GPU (general)
> =============
>
> --
> 2.53.0