NVIDIA GPU driver infrastructure
 help / color / mirror / Atom feed
* [PATCH v2 0/1] rust: pci: add a prerequisite for the r000 GSP firmware
@ 2026-11-11 20:05 John Hubbard
  2026-11-11 20:05 ` [PATCH v2 1/1] rust: pci: add domain_nr() accessor John Hubbard
  0 siblings, 1 reply; 4+ messages in thread
From: John Hubbard @ 2026-11-11 20:05 UTC (permalink / raw)
  To: Danilo Krummrich
  Cc: Alexandre Courbot, Timur Tabi, Alistair Popple, Eliot Courtney,
	Zhi Wang, David Airlie, Simona Vetter, Bjorn Helgaas,
	Krzysztof Wilczyński, Miguel Ojeda, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross, Daniel Almeida, Tamir Duberstein, Onur Özkan,
	linux-pci, rust-for-linux, nova-gpu, dri-devel, LKML,
	John Hubbard

Here is a preparatory change for (or more accurately, from) the r000
GSP firmware series [1], which enables nova-core to work with the GSP
firmware for r615+ releases.

For the Rust PCI abstraction, add an accessor for the PCI domain
number. The patch stands on its own, so posting it now helps avoid
reviewing a huge-er r000 series. :)

This applies to today's drm-rust-next: commit 6e557330b874 ("gpu:
nova-core: factor out and expose Falcon::is_processor_suspended()")

Changes since v1 [2]:

* The helper takes a struct pci_bus pointer and only calls
  pci_domain_nr(), so that it is a transparent wrapper (Danilo). The v1
  helper took a struct pci_dev pointer, which broke the powerpc and
  s390 builds (Sashiko).

* The CAST comment is directly above the cast (Danilo).

* The CAST comment no longer cites pci_register_host_bridge(), which
  checks the domain only under CONFIG_PCI_DOMAINS_GENERIC.

* v2 has no Suggested-by tag, because Miguel suggested the
  debug_assert!() and not the accessor (Danilo).

* Patch 2/2 of v1 is in drm-rust-next, so v2 is a single patch.

An LLM coding assistant (Claude Code) helped write this patch, but I
have fussed over every line of both the code and the commit message.

Testing: booted nova-core on my 3-GPU test system (Turing, Ampere and
Blackwell GPUs) with all KUnit and built-in Nova tests enabled, as
usual.

[1] https://lore.kernel.org/all/20260918010719.1176945-1-jhubbard@nvidia.com/
[2] https://lore.kernel.org/all/20261110033655.148487-1-jhubbard@nvidia.com/


John Hubbard (1):
  rust: pci: add domain_nr() accessor

 rust/helpers/pci.c |  5 +++++
 rust/kernel/pci.rs | 16 ++++++++++++++++
 2 files changed, 21 insertions(+)


base-commit: 6e557330b874b0e1fdd03e8fe4c438f36c93eefa
-- 
2.56.1


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

end of thread, other threads:[~2026-11-12  9:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-11 20:05 [PATCH v2 0/1] rust: pci: add a prerequisite for the r000 GSP firmware John Hubbard
2026-11-11 20:05 ` [PATCH v2 1/1] rust: pci: add domain_nr() accessor John Hubbard
2026-11-12  1:28   ` Alexandre Courbot
2026-11-12  9:47   ` Gary Guo

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