On Mon Nov 30, 2026 at 10:07 PM JST, Gary Guo wrote: > From: Gary Guo <[email protected]> > > Migrate users of the Nova's internal `num` module over to the > `kernel::num::casts` instead. `FromSafeCast` and `IntoSafeCast` are > migrated to the same-named traits or their `Arch` variant; `uX_as_uY` > methods are migrated to `FromSafeCast`/`IntoSafeCast` outside const > contexts and migrated to `cv!` macro inside const context. > > Signed-off-by: Gary Guo <[email protected]> > --- > drivers/gpu/nova-core/falcon.rs | 2 +- > drivers/gpu/nova-core/falcon/fsp.rs | 4 +- > drivers/gpu/nova-core/fb.rs | 2 +- > drivers/gpu/nova-core/firmware.rs | 2 +- > drivers/gpu/nova-core/firmware/booter.rs | 2 +- > drivers/gpu/nova-core/firmware/fwsec.rs | 2 +- > drivers/gpu/nova-core/firmware/fwsec/bootloader.rs | 2 +- > drivers/gpu/nova-core/firmware/gen_bootloader.rs | 2 +- > drivers/gpu/nova-core/firmware/gsp.rs | 2 +- > drivers/gpu/nova-core/firmware/radix3.rs | 6 +- > drivers/gpu/nova-core/firmware/tlv.rs | 8 +- > drivers/gpu/nova-core/gsp.rs | 4 +- > drivers/gpu/nova-core/gsp/cmdq.rs | 3 +- > drivers/gpu/nova-core/gsp/fw.rs | 14 +- > drivers/gpu/nova-core/gsp/fw/commands.rs | 2 +- > drivers/gpu/nova-core/gsp/nvkv/decode.rs | 18 ++- > drivers/gpu/nova-core/gsp/sequencer.rs | 2 +- > drivers/gpu/nova-core/irq/interrupt_tree.rs | 20 +-- > drivers/gpu/nova-core/mctp.rs | 7 +- > drivers/gpu/nova-core/mm/bar_user.rs | 20 ++- > drivers/gpu/nova-core/mm/pagetable/map.rs | 18 +-- > drivers/gpu/nova-core/mm/pagetable/walk.rs | 24 ++-- > drivers/gpu/nova-core/mm/pramin.rs | 7 +- > drivers/gpu/nova-core/mm/vmm.rs | 17 +-- > drivers/gpu/nova-core/num.rs | 158 > --------------------- > drivers/gpu/nova-core/vbios.rs | 2 +- > 26 files changed, 94 insertions(+), 256 deletions(-)
There have been a couple of efforts to do that already (most recent being [1] IIRC), but landing it has been tricky and pending on the availability of `cv!`. And with all the code landing in Nova at the moment this is going to be difficult to apply, actually this already results in lots of conflicts on today's drm-rust-next. If we want to get this in soon, I think a good point to land this would be after the r000 switch and before we start landing the vGPU patches. I can point you to the tree once I have a better idea of what it will look like, or I can revive my own patch if you prefer. [1] https://lore.kernel.org/all/[email protected]/
