On Fri Jan 16, 2026 at 10:49 PM CET, Timur Tabi wrote: > From: Alexandre Courbot <[email protected]> > > `LogBuffer` is the entity we ultimately want to dump through debugfs. > Provide a simple implementation of `BinaryWriter` for it, albeit it > might not cut the safety requirements. > > Signed-off-by: Alexandre Courbot <[email protected]> > Signed-off-by: Timur Tabi <[email protected]> > --- > drivers/gpu/nova-core/gsp.rs | 40 ++++++++++++++++++++++++++++++++++++ > 1 file changed, 40 insertions(+) > > diff --git a/drivers/gpu/nova-core/gsp.rs b/drivers/gpu/nova-core/gsp.rs > index 766fd9905358..273327c33aa7 100644 > --- a/drivers/gpu/nova-core/gsp.rs > +++ b/drivers/gpu/nova-core/gsp.rs > @@ -3,6 +3,7 @@ > mod boot; > > use kernel::{ > + debugfs, > device, > dma::{ > CoherentAllocation, > @@ -117,6 +118,45 @@ pub(crate) struct Gsp { > rmargs: CoherentAllocation<GspArgumentsCached>, > } > > +impl debugfs::BinaryWriter for LogBuffer {
Let's move this code into rust/kernel/dma.rs and make it an impl debugfs::BinaryWriter for CoherentAllocation<u8>.
