Re: [PATCH v10 10/21] gpu: nova-core: mm: Add MMU v2 page table types

From: Eliot Courtney

Date: Thu Apr 02 2026 - 01:42:26 EST


On Wed Apr 1, 2026 at 6:20 AM JST, Joel Fernandes wrote:
> Add page table entry and directory structures for MMU version 2
> used by Turing/Ampere/Ada GPUs.
>
> Cc: Nikola Djukic <ndjukic@xxxxxxxxxx>
> Signed-off-by: Joel Fernandes <joelagnelf@xxxxxxxxxx>
> ---
> drivers/gpu/nova-core/mm/pagetable.rs | 2 +
> drivers/gpu/nova-core/mm/pagetable/ver2.rs | 232 +++++++++++++++++++++
> 2 files changed, 234 insertions(+)
> create mode 100644 drivers/gpu/nova-core/mm/pagetable/ver2.rs
>
> diff --git a/drivers/gpu/nova-core/mm/pagetable.rs b/drivers/gpu/nova-core/mm/pagetable.rs
> index 50b76d5e5aaf..38d88f8f09a9 100644
> --- a/drivers/gpu/nova-core/mm/pagetable.rs
> +++ b/drivers/gpu/nova-core/mm/pagetable.rs
> @@ -8,6 +8,8 @@
>
> #![expect(dead_code)]
>
> +pub(crate) mod ver2;
> +

This looks like it has more visibility than necessary. And it seems
incorrect for anyone in the crate to care about MMU version details.
This can probably be just 'mod ver2'. There are a lot of other types /
functions in this series that could have tighter visibility. Could you
go through and see if you can reduce a bunch to private or pub(super)?

thanks!