From: "Gary Guo" <gary@garyguo.net>
To: "Alexandre Courbot" <acourbot@nvidia.com>, "Gary Guo" <gary@kernel.org>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>, <nova-gpu@lists.linux.dev>,
<dri-devel@lists.freedesktop.org>, "Gary Guo" <gary@garyguo.net>
Subject: Re: [PATCH] gpu: nova-core: migrate to `kernel::num::casts`
Date: Wed, 02 Dec 2026 13:09:26 +0000 [thread overview]
Message-ID: <DNA9RV0UX5G4.2TDR5PSQM2FPC@garyguo.net> (raw)
In-Reply-To: <DNA1TZ0WZKWN.1F08MI3NYYCZA@nvidia.com>
On Wed Dec 2, 2026 at 6:56 AM GMT, Alexandre Courbot wrote:
> On Mon Nov 30, 2026 at 10:07 PM JST, Gary Guo wrote:
>> From: Gary Guo <gary@garyguo.net>
>>
>> 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 <gary@garyguo.net>
>> ---
>> 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!`.
I did searched the list quite extensively and I didn't find one in this cycle,
so I sent this one.
>
> 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.
The good part is that if we skip removing content from num.rs , then you can
just leave conflicting file untouched and leave the rest as follow-up?
Or the idea is to avoid this introducing conflicts to the patches that you're
about to apply?
>
> 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.
Not necessarily "soon", but given that we spent a few cycles on this I'd
definitely like to see this landing this cycle. The time point you suggested is
fine; if you let me know then I can do a quick re-spin (or if you want to send a
version for me to just review it's fine too).
Best,
Gary
>
> [1] https://lore.kernel.org/all/20260828-nova_num-v1-0-e21f17ba4127@nvidia.com/
prev parent reply other threads:[~2026-12-02 13:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 13:07 [PATCH] gpu: nova-core: migrate to `kernel::num::casts` Gary Guo
2026-12-02 6:56 ` Alexandre Courbot
2026-12-02 13:09 ` Gary Guo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DNA9RV0UX5G4.2TDR5PSQM2FPC@garyguo.net \
--to=gary@garyguo.net \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=simona@ffwll.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.