]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpu: nova-core: bitfield: Add support for different storage widths
authorJoel Fernandes <joelagnelf@nvidia.com>
Thu, 16 Oct 2025 15:13:22 +0000 (11:13 -0400)
committerAlexandre Courbot <acourbot@nvidia.com>
Tue, 21 Oct 2025 13:39:44 +0000 (22:39 +0900)
commit7cabacb1aad647931980f63fa18292ad3f859544
tree4695da61c1d053b32fae2be94ecbe8ef07b7397e
parent71ea85be25b4f54a53ec03d5deaed52f5ee65da8
gpu: nova-core: bitfield: Add support for different storage widths

Previously, bitfields were hardcoded to use u32 as the underlying
storage type.  Add support for different storage types (u8, u16, u32,
u64) to the bitfield macro.

New syntax is: struct Name(<type ex., u32>) { ... }

Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Elle Rhumsaa <elle@weathered-steel.dev>
Reviewed-by: Edwin Peer <epeer@nvidia.com>
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
[acourbot@nvidia.com: fix long lines warnings.]
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Message-ID: <20251016151323.1201196-4-joelagnelf@nvidia.com>
drivers/gpu/nova-core/bitfield.rs
drivers/gpu/nova-core/regs/macros.rs