]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpu: nova-core: create debugfs root in module init
authorTimur Tabi <ttabi@nvidia.com>
Thu, 19 Mar 2026 21:26:57 +0000 (16:26 -0500)
committerDanilo Krummrich <dakr@kernel.org>
Wed, 25 Mar 2026 00:24:26 +0000 (01:24 +0100)
commit09691f5d807065a1d3d3042e2d8c2e0c170d7711
tree894bc68b2a07880e0d857446108f2a02162647e0
parentea0c83806f790de0b3441ddebbbcfd82196d6cce
gpu: nova-core: create debugfs root in module init

Create the 'nova_core' root debugfs entry when the driver loads.

Normally, non-const global variables need to be protected by a
mutex.  Instead, we use unsafe code, as we know the entry is never
modified after the driver is loaded.  This solves the lifetime
issue of the mutex guard, which would otherwise have required the
use of `pin_init_scope`.

Signed-off-by: Timur Tabi <ttabi@nvidia.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Tested-by: John Hubbard <jhubbard@nvidia.com>
Tested-by: Eliot Courtney <ecourtney@nvidia.com>
Link: https://patch.msgid.link/20260319212658.2541610-6-ttabi@nvidia.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
drivers/gpu/nova-core/nova_core.rs