[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <DG7HD0DPWUB1.2UAHI0CVE0MJZ@garyguo.net>
Date: Fri, 06 Feb 2026 01:16:23 +0000
From: "Gary Guo" <gary@...yguo.net>
To: "John Hubbard" <jhubbard@...dia.com>, "Danilo Krummrich"
<dakr@...nel.org>, "Alexandre Courbot" <acourbot@...dia.com>
Cc: "Joel Fernandes" <joelagnelf@...dia.com>, "Timur Tabi"
<ttabi@...dia.com>, "Alistair Popple" <apopple@...dia.com>, "Eliot
Courtney" <ecourtney@...dia.com>, "Zhi Wang" <zhiw@...dia.com>, "David
Airlie" <airlied@...il.com>, "Simona Vetter" <simona@...ll.ch>, "Bjorn
Helgaas" <bhelgaas@...gle.com>, "Miguel Ojeda" <ojeda@...nel.org>, "Alex
Gaynor" <alex.gaynor@...il.com>, "Boqun Feng" <boqun.feng@...il.com>, "Gary
Guo" <gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, "Benno Lossin" <lossin@...nel.org>, "Andreas
Hindborg" <a.hindborg@...nel.org>, "Alice Ryhl" <aliceryhl@...gle.com>,
"Trevor Gross" <tmgross@...ch.edu>, <nouveau@...ts.freedesktop.org>,
<rust-for-linux@...r.kernel.org>, "LKML" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] gpu: nova-core: fix aux device registration for
multi-GPU systems
On Thu Feb 5, 2026 at 10:17 PM GMT, John Hubbard wrote:
> The auxiliary device registration was using a hardcoded ID of 0, which
> caused probe() to fail on multi-GPU systems with:
>
> sysfs: cannot create duplicate filename '/bus/auxiliary/devices/NovaCore.nova-drm.0'
>
> Fix this by using an LKMM atomic counter to generate unique IDs for each
> GPU's aux device registration. The TODO item to eventually use XArray
> for recycling aux device IDs is retained (and modified slightly: IDA
> might be better) but for now, this works very nicely.
>
> This has the side effect of making debugfs[1] work on multi-GPU systems.
>
> [1] https://lore.kernel.org/20260203224757.871729-1-ttabi@nvidia.com
>
> Cc: Danilo Krummrich <dakr@...nel.org>
> Cc: Gary Guo <gary@...yguo.net>
> Signed-off-by: John Hubbard <jhubbard@...dia.com>
Reviewed-by: Gary Guo <gary@...yguo.net>
> ---
> drivers/gpu/nova-core/driver.rs | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
> Changes in v2:
>
> * Use LKMM atomics (kernel::sync::atomic::Atomic<u32>) instead of Rust
> standard library atomics (core::sync::atomic::AtomicU32).
>
> * Fix vertical import formatting (add rustfmt guard comment).
>
> * Remove stray "we" from TODO comment.
>
Powered by blists - more mailing lists