From: Alexandre Courbot <acourbot@nvidia.com>
To: "Danilo Krummrich" <dakr@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"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>,
"Trevor Gross" <tmgross@umich.edu>,
"Tamir Duberstein" <tamird@kernel.org>,
"Onur Özkan" <work@onurozkan.dev>
Cc: John Hubbard <jhubbard@nvidia.com>,
Alistair Popple <apopple@nvidia.com>,
Timur Tabi <ttabi@nvidia.com>,
Eliot Courtney <ecourtney@nvidia.com>,
Zhi Wang <zhiw@nvidia.com>,
driver-core@lists.linux.dev, rust-for-linux@vger.kernel.org,
linux-kernel@vger.kernel.org, nova-gpu@lists.linux.dev,
dri-devel@lists.freedesktop.org,
Alexandre Courbot <acourbot@nvidia.com>
Subject: [PATCH 0/8] rust: io: register: allow paths for relative register bases
Date: Tue, 21 Jul 2026 04:00:09 -0700 [thread overview]
Message-ID: <20260721-registers_fix-v1-0-3711b2317e1f@nvidia.com> (raw)
The register! macro currently accepts an identifier as the base of a
relative register. This requires base types declared in other modules to
be imported into the module containing the register declaration, rather
than allowing a qualified path to be used directly, which is arbitrarily
limiting.
This series allows path to be used as relative register bases. Since a
`path` fragment cannot be followed by `+` in declarative macros, the
`Base + Offset` and `Base + Alias` forms are replaced with `Base:
Offset` and `Base: Alias`, inducing a syntax change.
The first two patches clean up the macro's internal dispatch and
arguments in preparation for the change. Patches 3-6 gradually add
support for the new syntax and update docs and examples, while
preserving the old syntax. Patch 7 updates Nova to use the new syntax,
and patch 8 removes support for the now unused old syntax.
The series is structured this way so the Nova update and deprecated
syntax removal can be merged separately, as otherwise the whole series
would need to go through drm-rust.
Outside of the syntax update, no functional change is intended.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
Alexandre Courbot (8):
rust: io: register: dispatch fixed array shortcut internally
rust: io: register: remove unused rule arguments
rust: io: register: use path fragment for alias destination
rust: io: register: use path fragment in relative internal rules
rust: io: register: allow paths for relative register bases
rust: io: register: use new relative base syntax in doc and examples
gpu: nova-core: convert relative registers to new syntax
rust: io: register: remove deprecated relative register rule
drivers/gpu/nova-core/regs.rs | 74 +++++++++++++++++++++---------------------
rust/kernel/io/register.rs | 75 +++++++++++++++++++++----------------------
2 files changed, 74 insertions(+), 75 deletions(-)
---
base-commit: 22e77d81d0a9ab3aee1c5538b3f2f8a66930bfa7
change-id: 20260418-registers_fix-7a67ebef9ba0
Best regards,
--
Alexandre Courbot <acourbot@nvidia.com>
next reply other threads:[~2026-07-21 11:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 11:00 Alexandre Courbot [this message]
2026-07-21 11:00 ` [PATCH 1/8] rust: io: register: dispatch fixed array shortcut internally Alexandre Courbot
2026-07-21 14:17 ` Gary Guo
2026-07-21 14:24 ` Gary Guo
2026-07-21 11:00 ` [PATCH 2/8] rust: io: register: remove unused rule arguments Alexandre Courbot
2026-07-21 11:00 ` [PATCH 3/8] rust: io: register: use path fragment for alias destination Alexandre Courbot
2026-07-21 11:00 ` [PATCH 4/8] rust: io: register: use path fragment in relative internal rules Alexandre Courbot
2026-07-21 11:41 ` Alexandre Courbot
2026-07-21 11:00 ` [PATCH 5/8] rust: io: register: allow paths for relative register bases Alexandre Courbot
2026-07-21 11:00 ` [PATCH 6/8] rust: io: register: use new relative base syntax in doc and examples Alexandre Courbot
2026-07-21 11:00 ` [PATCH 7/8] gpu: nova-core: convert relative registers to new syntax Alexandre Courbot
2026-07-21 11:00 ` [PATCH 8/8] rust: io: register: remove deprecated relative register rule Alexandre Courbot
2026-07-21 14:34 ` [PATCH 0/8] rust: io: register: allow paths for relative register bases Gary Guo
2026-07-21 15:02 ` Alexandre Courbot
2026-07-21 15:06 ` 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=20260721-registers_fix-v1-0-3711b2317e1f@nvidia.com \
--to=acourbot@nvidia.com \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.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=driver-core@lists.linux.dev \
--cc=ecourtney@nvidia.com \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@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=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
all inboxes | Powered by JetHome®