public inbox for rust-for-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/8] gpu: nova-core: expose the logging buffers via debugfs
@ 2026-01-16 21:49 Timur Tabi
  2026-01-16 21:49 ` [PATCH v5 1/8] rust: pci: add device name method Timur Tabi
                   ` (7 more replies)
  0 siblings, 8 replies; 34+ messages in thread
From: Timur Tabi @ 2026-01-16 21:49 UTC (permalink / raw)
  To: Matthew Maurer, Danilo Krummrich, Gary Guo, John Hubbard,
	Joel Fernandes, Alexandre Courbot, nouveau, rust-for-linux

GSP-RM writes its printf message to "logging buffers", which are blocks
memory allocated by the driver.  The messages are encoded, so exposing
the buffers as debugfs entries allows the buffers to be extracted and
decoded by a special application.

When the driver loads, a /sys/kernel/debug/nova_core root entry is
created.  To do this, the normal module_pci_driver! macro call is
replaced with an explicit initialization function, as this allows
that debugfs entry to be created once for all GPUs.

Then in each GPU's initialization, a subdirectory based on the PCI
BDF name is created, and the logging buffer entries are created under
that.

Note: the debugfs entry has a file size of 0, because debugfs defaults
a 0 size and the Rust abstractions do not adjust it for the same of
the object.  Nouveau makes this adjustment manually in the driver.

Changes since v4:
1. Replaced all debugfs_lookup() code with the original global DEBUGFS_ROOT variable.
2. Added a Dir::empty() to support !DEBUGFS
3. Added UserSliceWriter::write_buffer() to avoid creating a slice over the log buffer.
4. Replaced pci::name() with device::name()

Alexandre Courbot (1):
  gpu: nova-core: implement BinaryWriter for LogBuffer

Timur Tabi (7):
  rust: pci: add device name method
  rust: debugfs: add Dir::empty() for conditional debugfs usage
  rust: uaccess: add UserSliceWriter::write_buffer() for raw pointer
    writes
  gpu: nova-core: Replace module_pci_driver! with explicit module init
  gpu: nova-core: use pin projection in method boot()
  gpu: nova-core: create debugfs root in module init
  gpu: nova-core: create GSP-RM logging buffers debugfs entries

 drivers/gpu/nova-core/gsp.rs       | 85 +++++++++++++++++++++++++++---
 drivers/gpu/nova-core/gsp/boot.rs  | 14 ++---
 drivers/gpu/nova-core/nova_core.rs | 44 ++++++++++++++--
 rust/helpers/device.c              |  5 ++
 rust/kernel/debugfs.rs             | 18 +++++++
 rust/kernel/device.rs              | 16 ++++++
 rust/kernel/uaccess.rs             | 50 ++++++++++++++++++
 7 files changed, 215 insertions(+), 17 deletions(-)


base-commit: 654826aa4a8f25cf825ad9254f37e6cb5092098f
-- 
2.52.0


^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2026-01-28 20:52 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-16 21:49 [PATCH v5 0/8] gpu: nova-core: expose the logging buffers via debugfs Timur Tabi
2026-01-16 21:49 ` [PATCH v5 1/8] rust: pci: add device name method Timur Tabi
2026-01-17 11:09   ` Danilo Krummrich
2026-01-27 21:04     ` Timur Tabi
2026-01-27 21:07       ` Danilo Krummrich
2026-01-16 21:49 ` [PATCH v5 2/8] rust: debugfs: add Dir::empty() for conditional debugfs usage Timur Tabi
2026-01-19 12:08   ` Gary Guo
2026-01-20 17:54   ` Matthew Maurer
2026-01-20 18:19     ` Danilo Krummrich
2026-01-16 21:49 ` [PATCH v5 3/8] rust: uaccess: add UserSliceWriter::write_buffer() for raw pointer writes Timur Tabi
2026-01-17 11:18   ` Danilo Krummrich
2026-01-17 11:19     ` Danilo Krummrich
2026-01-17 13:23   ` Alice Ryhl
2026-01-17 14:23     ` Alice Ryhl
2026-01-17 14:35       ` Danilo Krummrich
2026-01-19 12:13         ` Gary Guo
2026-01-19 12:38           ` Danilo Krummrich
2026-01-16 21:49 ` [PATCH v5 4/8] gpu: nova-core: implement BinaryWriter for LogBuffer Timur Tabi
2026-01-17 11:22   ` Danilo Krummrich
2026-01-19 12:17   ` Gary Guo
2026-01-28 20:20     ` Timur Tabi
2026-01-16 21:49 ` [PATCH v5 5/8] gpu: nova-core: Replace module_pci_driver! with explicit module init Timur Tabi
2026-01-17 11:24   ` Danilo Krummrich
2026-01-28 20:52     ` Timur Tabi
2026-01-16 21:49 ` [PATCH v5 6/8] gpu: nova-core: use pin projection in method boot() Timur Tabi
2026-01-16 21:49 ` [PATCH v5 7/8] gpu: nova-core: create debugfs root in module init Timur Tabi
2026-01-17 12:18   ` Danilo Krummrich
2026-01-17 12:29   ` Danilo Krummrich
2026-01-17 20:58     ` Timur Tabi
2026-01-17 21:35       ` Danilo Krummrich
2026-01-17 21:52         ` Timur Tabi
2026-01-17 22:00           ` Danilo Krummrich
2026-01-16 21:49 ` [PATCH v5 8/8] gpu: nova-core: create GSP-RM logging buffers debugfs entries Timur Tabi
2026-01-17 12:21   ` Danilo Krummrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox