From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Danilo Krummrich" <dakr@kernel.org>
Cc: <aliceryhl@google.com>, <abdiel.janulgue@gmail.com>,
<daniel.almeida@collabora.com>, <robin.murphy@arm.com>,
<a.hindborg@kernel.org>, <ojeda@kernel.org>, <boqun@kernel.org>,
<gary@garyguo.net>, <bjorn3_gh@protonmail.com>,
<lossin@kernel.org>, <tmgross@umich.edu>, <tamird@kernel.org>,
<work@onurozkan.dev>, <driver-core@lists.linux.dev>,
<nova-gpu@lists.linux.dev>, <dri-devel@lists.freedesktop.org>,
<linux-kernel@vger.kernel.org>, <rust-for-linux@vger.kernel.org>
Subject: Re: [PATCH 2/2] gpu: nova-core: remove unnecessary firmware pin-init
Date: Mon, 16 Nov 2026 13:02:11 +0900 [thread overview]
Message-ID: <DMWC44MU9W7N.3TBNH0HCKK065@nvidia.com> (raw)
In-Reply-To: <20261114234324.82387-2-dakr@kernel.org>
On Sun Nov 15, 2026 at 8:42 AM JST, Danilo Krummrich wrote:
> Now that SGTable no longer requires pinning, remove the pin-init
> machinery from Radix3 and GspFirmware.
>
> Signed-off-by: Danilo Krummrich <dakr@kernel.org>
> ---
> drivers/gpu/nova-core/firmware/gsp.rs | 43 +++++--------
> drivers/gpu/nova-core/firmware/radix3.rs | 82 +++++++++++-------------
> drivers/gpu/nova-core/gsp/boot.rs | 2 +-
> 3 files changed, 56 insertions(+), 71 deletions(-)
>
> diff --git a/drivers/gpu/nova-core/firmware/gsp.rs b/drivers/gpu/nova-core/firmware/gsp.rs
> index 341a8b19aa38..ff92a12b2994 100644
> --- a/drivers/gpu/nova-core/firmware/gsp.rs
> +++ b/drivers/gpu/nova-core/firmware/gsp.rs
> @@ -25,10 +25,8 @@
> };
>
> /// The GSP firmware image, its signatures, and the GSP bootloader.
> -#[pin_data]
> pub(crate) struct GspFirmware<'a> {
> /// The firmware image and the radix3 table that maps it.
> - #[pin]
> radix3: Radix3<'a>,
> /// Device-mapped GSP signatures matching the GPU's [`Chipset`].
> pub(crate) signatures: Coherent<'a, [u8]>,
> @@ -39,34 +37,27 @@ pub(crate) struct GspFirmware<'a> {
> impl<'a> GspFirmware<'a> {
> /// Loads the GSP firmware binaries, map them into `dev`'s address-space, and creates the page
> /// tables expected by the GSP bootloader to load it.
> - pub(crate) fn new(
> - dev: &'a device::Device<device::Bound>,
> - chipset: Chipset,
> - ) -> impl PinInit<Self, Error> + 'a {
> - pin_init::pin_init_scope(move || {
> - let firmware = request_tlv(dev, chipset, "gsp")?;
> - let tlv = Tlv::new(firmware.data())?;
> - dev_dbg!(dev, "loaded gsp firmware v{}\n", tlv.get_string(b"VERS")?);
> + pub(crate) fn new(dev: &'a device::Device<device::Bound>, chipset: Chipset) -> Result<Self> {
`GspFirmware` is 312 bytes, that's not enormous but that's also not
small... Shall we keep returning an `impl Pininit`?
> diff --git a/drivers/gpu/nova-core/firmware/radix3.rs b/drivers/gpu/nova-core/firmware/radix3.rs
> index a3e43fc8ec86..2c8787d5930d 100644
> --- a/drivers/gpu/nova-core/firmware/radix3.rs
> +++ b/drivers/gpu/nova-core/firmware/radix3.rs
> @@ -32,60 +32,54 @@
> };
>
> /// A radix3 page table and the data it maps.
> -#[pin_data]
> pub(crate) struct Radix3<'a> {
> /// The mapped data.
> - data: SGTable<Owned<'a, VVec<u8>>>,
> - /// Level 2: one entry per page of `data`.
> - level2: SGTable<Owned<'a, VVec<u8>>>,
> - /// Level 1: one entry per page of `level2`.
> - level1: SGTable<Owned<'a, VVec<u8>>>,
> - /// Level 0: one page, whose single entry is the DMA address of the first `level1` page.
> + _data: SGTable<Owned<'a, VVec<u8>>>,
> + /// Level 2: one entry per page of `_data`.
> + _level2: SGTable<Owned<'a, VVec<u8>>>,
> + /// Level 1: one entry per page of `_level2`.
> + _level1: SGTable<Owned<'a, VVec<u8>>>,
> + /// Level 0: one page, whose single entry is the DMA address of the first `_level1` page.
> level0: Coherent<'a, [u64]>,
> - /// Length of `data`, in bytes.
> + /// Length of `_data`, in bytes.
> size: usize,
> }
>
> impl<'a> Radix3<'a> {
> /// Builds a radix3 page table over `data`, mapped for `dev` to read. May sleep.
> - pub(crate) fn new(
> - dev: &'a device::Device<device::Bound>,
> - data: VVec<u8>,
> - ) -> impl PinInit<Self, Error> + 'a {
> + pub(crate) fn new(dev: &'a device::Device<device::Bound>, data: VVec<u8>) -> Result<Self> {
Similar comment as `Radix3` is 216 bytes.
next prev parent reply other threads:[~2026-11-16 4:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 23:42 [PATCH 1/2] rust: scatterlist: tie owned tables to the device's bound lifetime Danilo Krummrich
2026-11-14 23:42 ` [PATCH 2/2] gpu: nova-core: remove unnecessary firmware pin-init Danilo Krummrich
2026-11-16 4:02 ` Alexandre Courbot [this message]
2026-11-16 12:29 ` Danilo Krummrich
2026-11-16 13:57 ` Alexandre Courbot
2026-11-16 4:02 ` [PATCH 1/2] rust: scatterlist: tie owned tables to the device's bound lifetime Alexandre Courbot
2026-11-16 12:43 ` Danilo Krummrich
2026-11-16 12:49 ` Gary Guo
2026-11-16 13:16 ` Danilo Krummrich
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=DMWC44MU9W7N.3TBNH0HCKK065@nvidia.com \
--to=acourbot@nvidia.com \
--cc=a.hindborg@kernel.org \
--cc=abdiel.janulgue@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=driver-core@lists.linux.dev \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=ojeda@kernel.org \
--cc=robin.murphy@arm.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
/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.