[PATCH v4 08/10] gpu: nova-core: convert falcon registers to kernel register macro
Alexandre Courbot
acourbot at nvidia.com
Tue Mar 24 22:53:24 PDT 2026
On Wed Mar 25, 2026 at 11:46 AM JST, Alexandre Courbot wrote:
> Convert all PFALCON, PFALCON2 and PRISCV registers to use the kernel's
> register macro and update the code accordingly.
>
> Because they rely on the same types to implement relative registers,
> they need to be updated in lockstep.
>
> nova-core's local register macro is now unused, so remove it.
>
> Reviewed-by: Gary Guo <gary at garyguo.net>
> Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
> ---
> drivers/gpu/nova-core/falcon.rs | 521 ++++++---------
> drivers/gpu/nova-core/falcon/gsp.rs | 22 +-
> drivers/gpu/nova-core/falcon/hal/ga102.rs | 55 +-
> drivers/gpu/nova-core/falcon/hal/tu102.rs | 12 +-
> drivers/gpu/nova-core/falcon/sec2.rs | 17 +-
> drivers/gpu/nova-core/firmware/fwsec/bootloader.rs | 19 +-
> drivers/gpu/nova-core/regs.rs | 353 +++++-----
> drivers/gpu/nova-core/regs/macros.rs | 739 ---------------------
> 8 files changed, 457 insertions(+), 1281 deletions(-)
>
> diff --git a/drivers/gpu/nova-core/falcon.rs b/drivers/gpu/nova-core/falcon.rs
> index 123de6c55b45..f3c0ee4d82a6 100644
> --- a/drivers/gpu/nova-core/falcon.rs
> +++ b/drivers/gpu/nova-core/falcon.rs
> @@ -15,14 +15,20 @@
> },
> io::{
> poll::read_poll_timeout,
> - Io, //
> + register::{
> + RegisterBase,
> + WithBase, //
> + },
> + Io,
> },
> + num::Bounded,
Apologies, I just realized this is a leftover which triggers the following error:
warning: unused import: `num::Bounded`
--> ../drivers/gpu/nova-core/falcon.rs:24:5
|
24 | num::Bounded,
| ^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
Not sure how it slipped in as I build each patch individually in my
checklist script. Thankfully this is easily fixed.
The silver lining is that this shows that despite the heavy reliance on
`Bounded` for register bitfields, this heavy user does not need to
create a single one explicitly. :)
More information about the linux-riscv
mailing list