Re: [PATCH FOR REFERENCE v8 10/10] gpu: nova-core: use the kernel `register!` macro
From: John Hubbard
Date: Mon Mar 09 2026 - 14:10:52 EST
On 3/9/26 11:04 AM, Danilo Krummrich wrote:
> On Mon Mar 9, 2026 at 6:34 PM CET, John Hubbard wrote:
>> On 3/9/26 8:43 AM, Joel Fernandes wrote:
>>> On 3/9/2026 11:14 AM, Alexandre Courbot wrote:
>> Let's break down the remaining troublesome part a bit:
>>
>> regs::NV_PFALCON_FALCON_MAILBOX1::zeroed().with_value(mbox1)
>>
>> * "regs::" can be omitted with a "use" statement, right?
>>
>> * ::zeroed() maybe should be the default behavior here, and then
>> it could also be omitted?
>>
>> * .with_value(mbox1) I'm sure this is necessary, but the construction
>> is unfortunately much less clear than .write(value)! Thoughts?
>
> I think this could also just be
>
> bar.write(regs::NV_PFALCON_FALCON_MAILBOX1::of::<E>(), mbox1);
That would be quite nice.
>
> as we would want it for FIFO-like registers.
thanks,
--
John Hubbard