From: Alexandre Courbot <acourbot@nvidia.com>
To: Danilo Krummrich <dakr@kernel.org>,
Alice Ryhl <aliceryhl@google.com>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
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>
Cc: John Hubbard <jhubbard@nvidia.com>,
Alistair Popple <apopple@nvidia.com>,
Joel Fernandes <joelagnelf@nvidia.com>,
Timur Tabi <ttabi@nvidia.com>, Zhi Wang <zhiw@nvidia.com>,
Eliot Courtney <ecourtney@nvidia.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org, linux-doc@vger.kernel.org,
rust-for-linux@vger.kernel.org,
Alexandre Courbot <acourbot@nvidia.com>
Subject: [PATCH v3 09/10] gpu: nova-core: remove `io::` qualifier to register macro invocations
Date: Mon, 23 Mar 2026 20:07:44 +0900 [thread overview]
Message-ID: <20260323-b4-nova-register-v3-9-ae2486ecef1b@nvidia.com> (raw)
In-Reply-To: <20260323-b4-nova-register-v3-0-ae2486ecef1b@nvidia.com>
The kernel's `register` macro would clash with nova-core's own version
if it was imported directly, so it was accessed through its `io` module
during the conversion phase.
Now that nova-core's `register` macro doesn't exist anymore, we can
import and use it directly without risk of name collision.
Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
drivers/gpu/nova-core/regs.rs | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/drivers/gpu/nova-core/regs.rs b/drivers/gpu/nova-core/regs.rs
index 87c2977ba6e4..2f171a4ff9ba 100644
--- a/drivers/gpu/nova-core/regs.rs
+++ b/drivers/gpu/nova-core/regs.rs
@@ -2,7 +2,7 @@
use kernel::{
io::{
- self,
+ register,
register::WithBase,
Io, //
},
@@ -35,7 +35,7 @@
// PMC
-io::register! {
+register! {
/// Basic revision information about the GPU.
pub(crate) NV_PMC_BOOT_0(u32) @ 0x00000000 {
/// Lower bits of the architecture.
@@ -106,7 +106,7 @@ fn fmt(&self, f: &mut kernel::fmt::Formatter<'_>) -> kernel::fmt::Result {
// PBUS
-io::register! {
+register! {
pub(crate) NV_PBUS_SW_SCRATCH(u32)[64] @ 0x00001400 {}
/// Scratch register 0xe used as FRTS firmware error code.
@@ -117,7 +117,7 @@ fn fmt(&self, f: &mut kernel::fmt::Formatter<'_>) -> kernel::fmt::Result {
// PFB
-io::register! {
+register! {
/// Low bits of the physical system memory address used by the GPU to perform sysmembar
/// operations (see [`crate::fb::SysmemFlush`]).
pub(crate) NV_PFB_NISO_FLUSH_SYSMEM_ADDR(u32) @ 0x00100c10 {
@@ -180,7 +180,7 @@ pub(crate) fn higher_bound(self) -> u64 {
// PGSP
-io::register! {
+register! {
pub(crate) NV_PGSP_QUEUE_HEAD(u32) @ 0x00110c00 {
31:0 address;
}
@@ -195,7 +195,7 @@ pub(crate) fn higher_bound(self) -> u64 {
// These scratch registers remain powered on even in a low-power state and have a designated group
// number.
-io::register! {
+register! {
/// Boot Sequence Interface (BSI) register used to determine
/// if GSP reload/resume has completed during the boot process.
pub(crate) NV_PGC6_BSI_SECURE_SCRATCH_14(u32) @ 0x001180f8 {
@@ -247,7 +247,7 @@ pub(crate) fn usable_fb_size(self) -> u64 {
// PDISP
-io::register! {
+register! {
pub(crate) NV_PDISP_VGA_WORKSPACE_BASE(u32) @ 0x00625f04 {
/// VGA workspace base address divided by 0x10000.
31:8 addr;
@@ -271,7 +271,7 @@ pub(crate) fn vga_workspace_addr(self) -> Option<u64> {
pub(crate) const NV_FUSE_OPT_FPF_SIZE: usize = 16;
-io::register! {
+register! {
pub(crate) NV_FUSE_OPT_FPF_NVDEC_UCODE1_VERSION(u32)[NV_FUSE_OPT_FPF_SIZE] @ 0x00824100 {
15:0 data => u16;
}
@@ -287,7 +287,7 @@ pub(crate) fn vga_workspace_addr(self) -> Option<u64> {
// PFALCON
-io::register! {
+register! {
pub(crate) NV_PFALCON_FALCON_IRQSCLR(u32) @ PFalconBase + 0x00000004 {
6:6 swgen0 => bool;
4:4 halt => bool;
@@ -468,7 +468,7 @@ pub(crate) fn mem_scrubbing_done(self) -> bool {
/* PFALCON2 */
-io::register! {
+register! {
pub(crate) NV_PFALCON2_FALCON_MOD_SEL(u32) @ PFalcon2Base + 0x00000180 {
7:0 algo ?=> FalconModSelAlgo;
}
@@ -490,7 +490,7 @@ pub(crate) fn mem_scrubbing_done(self) -> bool {
// PRISCV
-io::register! {
+register! {
/// RISC-V status register for debug (Turing and GA100 only).
/// Reflects current RISC-V core status.
pub(crate) NV_PRISCV_RISCV_CORE_SWITCH_RISCV_STATUS(u32) @ PFalcon2Base + 0x00000240 {
@@ -516,11 +516,11 @@ pub(crate) fn mem_scrubbing_done(self) -> bool {
// only be used in HAL modules.
pub(crate) mod gm107 {
- use kernel::io;
+ use kernel::io::register;
// FUSE
- io::register! {
+ register! {
pub(crate) NV_FUSE_STATUS_OPT_DISPLAY(u32) @ 0x00021c04 {
0:0 display_disabled => bool;
}
@@ -528,11 +528,11 @@ pub(crate) mod gm107 {
}
pub(crate) mod ga100 {
- use kernel::io;
+ use kernel::io::register;
// FUSE
- io::register! {
+ register! {
pub(crate) NV_FUSE_STATUS_OPT_DISPLAY(u32) @ 0x00820c04 {
0:0 display_disabled => bool;
}
--
2.53.0
next prev parent reply other threads:[~2026-03-23 11:08 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 11:07 [PATCH v3 00/10] gpu: nova-core: convert registers to use the kernel register macro Alexandre Courbot
2026-03-23 11:07 ` [PATCH v3 01/10] gpu: nova-core: convert PMC registers to " Alexandre Courbot
2026-03-23 11:21 ` Danilo Krummrich
2026-03-23 14:11 ` Alexandre Courbot
2026-03-23 14:21 ` Danilo Krummrich
2026-03-24 21:57 ` Claude review: " Claude Code Review Bot
2026-03-23 11:07 ` [PATCH v3 02/10] gpu: nova-core: convert PBUS " Alexandre Courbot
2026-03-24 21:57 ` Claude review: " Claude Code Review Bot
2026-03-23 11:07 ` [PATCH v3 03/10] gpu: nova-core: convert PFB " Alexandre Courbot
2026-03-24 21:57 ` Claude review: " Claude Code Review Bot
2026-03-23 11:07 ` [PATCH v3 04/10] gpu: nova-core: convert GC6 " Alexandre Courbot
2026-03-24 21:57 ` Claude review: " Claude Code Review Bot
2026-03-23 11:07 ` [PATCH v3 05/10] gpu: nova-core: convert FUSE " Alexandre Courbot
2026-03-24 21:57 ` Claude review: " Claude Code Review Bot
2026-03-23 11:07 ` [PATCH v3 06/10] gpu: nova-core: convert PDISP " Alexandre Courbot
2026-03-24 21:57 ` Claude review: " Claude Code Review Bot
2026-03-23 11:07 ` [PATCH v3 07/10] gpu: nova-core: falcon: introduce `bounded_enum` macro Alexandre Courbot
2026-03-23 11:22 ` Danilo Krummrich
2026-03-23 12:43 ` Gary Guo
2026-03-23 14:22 ` Alexandre Courbot
2026-03-24 21:57 ` Claude review: " Claude Code Review Bot
2026-03-23 11:07 ` [PATCH v3 08/10] gpu: nova-core: convert falcon registers to kernel register macro Alexandre Courbot
2026-03-24 21:57 ` Claude review: " Claude Code Review Bot
2026-03-23 11:07 ` Alexandre Courbot [this message]
2026-03-24 21:57 ` Claude review: gpu: nova-core: remove `io::` qualifier to register macro invocations Claude Code Review Bot
2026-03-23 11:07 ` [PATCH v3 10/10] Documentation: nova: remove register abstraction task Alexandre Courbot
2026-03-24 21:57 ` Claude review: " Claude Code Review Bot
2026-03-24 21:57 ` Claude review: gpu: nova-core: convert registers to use the kernel register macro Claude Code Review Bot
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=20260323-b4-nova-register-v3-9-ae2486ecef1b@nvidia.com \
--to=acourbot@nvidia.com \
--cc=a.hindborg@kernel.org \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ecourtney@nvidia.com \
--cc=gary@garyguo.net \
--cc=jhubbard@nvidia.com \
--cc=joelagnelf@nvidia.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=lossin@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=tmgross@umich.edu \
--cc=ttabi@nvidia.com \
--cc=tzimmermann@suse.de \
--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