[PATCH v2 0/1] rust: pci: add a prerequisite for the r000 GSP firmware
From: John Hubbard
Date: Wed Nov 11 2026 - 15:28:48 EST
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@xxxxxxxxxx/
[2] https://lore.kernel.org/all/20261110033655.148487-1-jhubbard@xxxxxxxxxx/
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