From: "Gary Guo" <gary@garyguo.net>
To: "Alexandre Courbot" <acourbot@nvidia.com>, "Gary Guo" <gary@garyguo.net>
Cc: "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>,
"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>,
"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
Subject: Re: [PATCH 0/8] rust: io: register: allow paths for relative register bases
Date: Tue, 21 Jul 2026 16:06:04 +0100 [thread overview]
Message-ID: <DK4CC5M4H2H3.1UJYQ9LMNA0UR@garyguo.net> (raw)
In-Reply-To: <DK4C92FSD0VC.3SXDWMMZQMC6W@nvidia.com>
On Tue Jul 21, 2026 at 4:02 PM BST, Alexandre Courbot wrote:
> On Tue Jul 21, 2026 at 7:34 AM PDT, Gary Guo wrote:
>> On Tue Jul 21, 2026 at 12:00 PM BST, Alexandre Courbot wrote:
>>> 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.
>>
>> I would like to avoid adding new features to relative registers as I aspire to
>> get rid of them entirely with typed registers.
>
> This is a fix rather than a new feature. Relative register bases should
> have been captured as a path since the beginning.
>
> I'll be glad to remove relative registers entirely if projections can
> cover their use-case better, but I would not withhold a fix while a
> replacement is not visible yet.
I'm not seeing this as a fix. Nova doesn't need to use a path, and requiring an
import is hardly a restriction.
Best,
Gary
prev parent reply other threads:[~2026-07-21 15:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 11:00 Alexandre Courbot
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 [this message]
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=DK4CC5M4H2H3.1UJYQ9LMNA0UR@garyguo.net \
--to=gary@garyguo.net \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--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=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®