Re: [PATCH] gpu: nova-core: require little endian

Joel Fernandes
2026-04-06T16:31:01Z

On 4/6/2026 2:52 AM, Eliot Courtney wrote:
> The driver already assumes little endian in a lot of locations. For
> example, all the code that reads RPCs out of the command queue just
> directly interprets the bytes.

Oh yeah, its not just the driver making assumptions, it is the hardware itself.
The Nvidia GPU architecture is little-endian (including MMU structures in VRAM).

>
> Make this explicit in Kconfig.
>
> Signed-off-by: Eliot Courtney <ecourtney@nvidia.com>
> ---
> The current code assumes little endian in a bunch of places. I think we
> should either explicitly decide to be generic on endianness or explicitly
> decide not to - having some handling sprinkled around in various
> locations seems confusing to me.
>
> I believe that currently e.g. `RUST` transitively depends on
> !CPU_BIG_ENDIAN, so this is more about making the decision explicit for
> nova-core rather than fixing any kind of hole.
> ---
> drivers/gpu/nova-core/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/nova-core/Kconfig b/drivers/gpu/nova-core/Kconfig
> index a4f2380654e2..d8456f8eaa05 100644
> --- a/drivers/gpu/nova-core/Kconfig
> +++ b/drivers/gpu/nova-core/Kconfig
> @@ -3,6 +3,7 @@ config NOVA_CORE
> depends on 64BIT
> depends on PCI
> depends on RUST
> + depends on !CPU_BIG_ENDIAN

If we want to do this, I am Ok. Although I am also Ok with the potential
transitive Rust dependency in which case the only value of adding it in Kconfig
is documentation. But just a side note (not a rejection comment), Nouveau does
not do this, and no other GPU driver afaics either.

thanks,

--
Joel Fernandes