The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Alistair Popple" <apopple@nvidia.com>
Cc: <nova-gpu@lists.linux.dev>, "Danilo Krummrich" <dakr@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"David Airlie" <airlied@gmail.com>,
	"Benno Lossin" <lossin@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"Eliot Courtney" <ecourtney@nvidia.com>,
	"John Hubbard" <jhubbard@nvidia.com>,
	<linux-kernel@vger.kernel.org>, <dri-devel@lists.freedesktop.org>,
	<rust-for-linux@vger.kernel.org>
Subject: Re: [PATCH v2 1/5] gpu: nova-core: Add public driver API to nova-core
Date: Thu, 09 Jul 2026 21:34:43 +0900	[thread overview]
Message-ID: <DJU1LQG3VOX8.39VWHFH4K7EKS@nvidia.com> (raw)
In-Reply-To: <20260709085204.565159-2-apopple@nvidia.com>

On Thu Jul 9, 2026 at 5:52 PM JST, Alistair Popple wrote:
<...>
> @@ -86,15 +90,31 @@ fn probe<'bound>(
>                  // (`try_pin_init!()` initializes fields in declaration order), lives at a pinned
>                  // stable address, and is dropped after `gpu` (struct field drop order).
>                  gpu <- Gpu::new(pdev, unsafe { &*core::ptr::from_ref(bar) }),
> -                _reg: auxiliary::Registration::new(
> -                    pdev.as_ref(),
> -                    c"nova-drm",
> -                    // TODO[XARR]: Use XArray or perhaps IDA for proper ID allocation/recycling. For
> -                    // now, use a simple atomic counter that never recycles IDs.
> -                    AUXILIARY_ID_COUNTER.fetch_add(1, Relaxed),
> -                    crate::MODULE_NAME,
> -                    (),
> -                )?,
> +
> +                _reg: {
> +                    // SAFETY: `gpu` is initialized before this expression is evaluated
> +                    // (`try_pin_init!()` initializes fields in declaration order), lives at
> +                    // a pinned stable address, and is dropped after `_reg` (struct field
> +                    // drop order).
> +                    let gpu = unsafe {
> +                        Pin::new_unchecked(&*core::ptr::from_ref(gpu.as_ref().get_ref()))
> +                    };

Your v1 had a 

    // TODO: Use `&gpu` self-referential pin-init syntax once available.

Can we preserve it?

  reply	other threads:[~2026-07-09 12:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09  8:51 [PATCH v2 0/5] gpu: nova: Export parameters from nova-core to nova-drm Alistair Popple
2026-07-09  8:52 ` [PATCH v2 1/5] gpu: nova-core: Add public driver API to nova-core Alistair Popple
2026-07-09 12:34   ` Alexandre Courbot [this message]
2026-07-09  8:52 ` [PATCH v2 2/5] gpu: nova: Add DRM registration data Alistair Popple
2026-07-09 12:34   ` Alexandre Courbot
2026-07-09  8:52 ` [PATCH v2 3/5] drm: nova: Add GETPARAM parameter to read the GPU chipset Alistair Popple
2026-07-09 12:35   ` Alexandre Courbot
2026-07-09 22:28     ` Danilo Krummrich
2026-07-09  8:52 ` [PATCH v2 4/5] drm: nova: Add a GETPARAM parameter to read usable VRAM size Alistair Popple
2026-07-09  8:52 ` [PATCH v2 5/5] drm: nova: Use nova-core to read VRAM_BAR_SIZE parameter Alistair Popple

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=DJU1LQG3VOX8.39VWHFH4K7EKS@nvidia.com \
    --to=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=apopple@nvidia.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ecourtney@nvidia.com \
    --cc=gary@garyguo.net \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=nova-gpu@lists.linux.dev \
    --cc=rust-for-linux@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox