[PATCH v2 0/3] rust, nova-core: add DeviceSize trait for SZ_* constants

John Hubbard posted 3 patches 3 weeks, 5 days ago
There is a newer version of this series
drivers/gpu/nova-core/fb.rs     |  31 ++++----
drivers/gpu/nova-core/gsp/fw.rs |  18 ++---
drivers/gpu/nova-core/regs.rs   |   6 +-
rust/kernel/ptr.rs              |  35 +++++++++
rust/kernel/sizes.rs            | 132 +++++++++++++++++++++-----------
5 files changed, 147 insertions(+), 75 deletions(-)
[PATCH v2 0/3] rust, nova-core: add DeviceSize trait for SZ_* constants
Posted by John Hubbard 3 weeks, 5 days ago
Changes in v2:
  * Replaced flat SZ_*_U64 constants with a DeviceSize trait that
    provides SZ_* as associated constants on u32 and u64.

  * A define_sizes! macro generates everything from one list of names.

  * Added Alignment::from_u64() so alignment values can be constructed
    from DeviceSize constants without falling back to usize variants.

  * Rebased onto drm-rust-next. No longer depends on the Blackwell
    patchset.

v1 is here:
    https://lore.kernel.org/20260310023145.120037-1-jhubbard@nvidia.com

John Hubbard (3):
  rust: sizes: add DeviceSize trait for device address space constants
  rust: ptr: add Alignment::from_u64() for DeviceSize constants
  gpu: nova-core: use DeviceSize trait for u64 size constants

 drivers/gpu/nova-core/fb.rs     |  31 ++++----
 drivers/gpu/nova-core/gsp/fw.rs |  18 ++---
 drivers/gpu/nova-core/regs.rs   |   6 +-
 rust/kernel/ptr.rs              |  35 +++++++++
 rust/kernel/sizes.rs            | 132 +++++++++++++++++++++-----------
 5 files changed, 147 insertions(+), 75 deletions(-)


base-commit: a544873ce0575b2fd8285a1364d3e09929d9a3ba
-- 
2.53.0