Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

gpu: nova-core: remove `io::` qualifier to register macro invocations

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>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patch.msgid.link/20260325-b4-nova-register-v4-9-bdf172f0f6ca@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>

+15 -15
+15 -15
drivers/gpu/nova-core/regs.rs
··· 2 2 3 3 use kernel::{ 4 4 io::{ 5 - self, 5 + register, 6 6 register::WithBase, 7 7 Io, // 8 8 }, ··· 35 35 36 36 // PMC 37 37 38 - io::register! { 38 + register! { 39 39 /// Basic revision information about the GPU. 40 40 pub(crate) NV_PMC_BOOT_0(u32) @ 0x00000000 { 41 41 /// Lower bits of the architecture. ··· 106 106 107 107 // PBUS 108 108 109 - io::register! { 109 + register! { 110 110 pub(crate) NV_PBUS_SW_SCRATCH(u32)[64] @ 0x00001400 {} 111 111 112 112 /// Scratch register 0xe used as FRTS firmware error code. ··· 117 117 118 118 // PFB 119 119 120 - io::register! { 120 + register! { 121 121 /// Low bits of the physical system memory address used by the GPU to perform sysmembar 122 122 /// operations (see [`crate::fb::SysmemFlush`]). 123 123 pub(crate) NV_PFB_NISO_FLUSH_SYSMEM_ADDR(u32) @ 0x00100c10 { ··· 180 180 181 181 // PGSP 182 182 183 - io::register! { 183 + register! { 184 184 pub(crate) NV_PGSP_QUEUE_HEAD(u32) @ 0x00110c00 { 185 185 31:0 address; 186 186 } ··· 195 195 // These scratch registers remain powered on even in a low-power state and have a designated group 196 196 // number. 197 197 198 - io::register! { 198 + register! { 199 199 /// Boot Sequence Interface (BSI) register used to determine 200 200 /// if GSP reload/resume has completed during the boot process. 201 201 pub(crate) NV_PGC6_BSI_SECURE_SCRATCH_14(u32) @ 0x001180f8 { ··· 247 247 248 248 // PDISP 249 249 250 - io::register! { 250 + register! { 251 251 pub(crate) NV_PDISP_VGA_WORKSPACE_BASE(u32) @ 0x00625f04 { 252 252 /// VGA workspace base address divided by 0x10000. 253 253 31:8 addr; ··· 271 271 272 272 pub(crate) const NV_FUSE_OPT_FPF_SIZE: usize = 16; 273 273 274 - io::register! { 274 + register! { 275 275 pub(crate) NV_FUSE_OPT_FPF_NVDEC_UCODE1_VERSION(u32)[NV_FUSE_OPT_FPF_SIZE] @ 0x00824100 { 276 276 15:0 data => u16; 277 277 } ··· 287 287 288 288 // PFALCON 289 289 290 - io::register! { 290 + register! { 291 291 pub(crate) NV_PFALCON_FALCON_IRQSCLR(u32) @ PFalconBase + 0x00000004 { 292 292 6:6 swgen0 => bool; 293 293 4:4 halt => bool; ··· 468 468 469 469 /* PFALCON2 */ 470 470 471 - io::register! { 471 + register! { 472 472 pub(crate) NV_PFALCON2_FALCON_MOD_SEL(u32) @ PFalcon2Base + 0x00000180 { 473 473 7:0 algo ?=> FalconModSelAlgo; 474 474 } ··· 490 490 491 491 // PRISCV 492 492 493 - io::register! { 493 + register! { 494 494 /// RISC-V status register for debug (Turing and GA100 only). 495 495 /// Reflects current RISC-V core status. 496 496 pub(crate) NV_PRISCV_RISCV_CORE_SWITCH_RISCV_STATUS(u32) @ PFalcon2Base + 0x00000240 { ··· 516 516 // only be used in HAL modules. 517 517 518 518 pub(crate) mod gm107 { 519 - use kernel::io; 519 + use kernel::io::register; 520 520 521 521 // FUSE 522 522 523 - io::register! { 523 + register! { 524 524 pub(crate) NV_FUSE_STATUS_OPT_DISPLAY(u32) @ 0x00021c04 { 525 525 0:0 display_disabled => bool; 526 526 } ··· 528 528 } 529 529 530 530 pub(crate) mod ga100 { 531 - use kernel::io; 531 + use kernel::io::register; 532 532 533 533 // FUSE 534 534 535 - io::register! { 535 + register! { 536 536 pub(crate) NV_FUSE_STATUS_OPT_DISPLAY(u32) @ 0x00820c04 { 537 537 0:0 display_disabled => bool; 538 538 }