Re: [PATCH v6 0/5] Introduce bitfield and move register macro to rust/kernel/
From: Yury Norov
Date: Wed Oct 08 2025 - 10:28:32 EST
On Wed, Oct 08, 2025 at 12:08:59AM +0200, Danilo Krummrich wrote:
> Regarding the bitfields for page table management: Are we
> sure that we can use raw bitfields for this?
As per my current understanding we can't. Bitfields are not suitable for
direct I/O and considered as a data storage. In the current scheme:
regs::NV_PFALCON_FALCON_DMATRFBASE::default()
.set_base((dma_start >> 8) as u32)
.write(bar, &E::ID);
we account for endianess in the .write() method, which would be a part
of register API, not bitfields.
FYI: ARM64 is in process of dropping BE, and Linus announced the end
of BE support for RISC-V:
https://lore.kernel.org/all/CAHk-=wgYcOiFvsJzFb+HfB4n6Wj6zM5H5EghUMfpXSCzyQVSfA@xxxxxxxxxxxxxx/
Thanks,
Yury