From: John Hubbard <jhubbard@nvidia.com>
To: Danilo Krummrich <dakr@kernel.org>
Cc: "Alexandre Courbot" <acourbot@nvidia.com>,
"Timur Tabi" <ttabi@nvidia.com>,
"Alistair Popple" <apopple@nvidia.com>,
"Eliot Courtney" <ecourtney@nvidia.com>,
"Zhi Wang" <zhiw@nvidia.com>, "David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Tamir Duberstein" <tamird@kernel.org>,
"Onur Özkan" <work@onurozkan.dev>,
linux-pci@vger.kernel.org, rust-for-linux@vger.kernel.org,
nova-gpu@lists.linux.dev, dri-devel@lists.freedesktop.org,
LKML <linux-kernel@vger.kernel.org>,
"John Hubbard" <jhubbard@nvidia.com>
Subject: [PATCH v2 0/1] rust: pci: add a prerequisite for the r000 GSP firmware
Date: Wed, 11 Nov 2026 12:05:48 -0800 [thread overview]
Message-ID: <20261111200549.160806-1-jhubbard@nvidia.com> (raw)
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
next reply other threads:[~2026-11-11 20:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 20:05 John Hubbard [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261111200549.160806-1-jhubbard@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=bhelgaas@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ecourtney@nvidia.com \
--cc=gary@garyguo.net \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=nova-gpu@lists.linux.dev \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=ttabi@nvidia.com \
--cc=work@onurozkan.dev \
--cc=zhiw@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox