summaryrefslogtreecommitdiff
path: root/rust/kernel/xarray.rs
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2025-07-18 16:26:22 +0900
committerAlexandre Courbot <acourbot@nvidia.com>2025-08-15 12:02:56 +0900
commit20ed4a8695b277c296e3a30306ef8551903e1e04 (patch)
treec4649c14df5a3a1ca996745fdce0466ad2494e63 /rust/kernel/xarray.rs
parente617f3a3702ca1ca2a498edbad0b12ceadc27321 (diff)
gpu: nova-core: register: add support for register arrays
Having registers that can be interpreted identically in a contiguous I/O area (or at least, following a given stride) is a common way to organize registers, and is used by NVIDIA hardware. Thus, add a way to simply and safely declare such a layout using the register!() macro. Build-time bound-checking is effective for array accesses performed with a constant. For cases where the index cannot be known at compile time, `try_` variants of the accessors are also made available that return `EINVAL` if the access is out-of-bounds. Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://lore.kernel.org/r/20250718-nova-regs-v2-17-7b6a762aa1cd@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Diffstat (limited to 'rust/kernel/xarray.rs')
0 files changed, 0 insertions, 0 deletions