Re: [PATCH 08/27] gpu: nova-core: add LIBOS3 log buffers and state monitor buffer

John Hubbard <[email protected]>
Newsgroups dev.linux.lists.nova-gpu,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 8/19/26 11:12 AM, Timur Tabi wrote:
> On Tue, 2026-08-18 at 20:52 -0700, John Hubbard wrote:
>> +/// Matches the registry defaults for the init, interrupt, RM, and MNOC tasks
>> +/// (`NV_REG_STR_RM_GSP_LOG_BUFFER_SIZE_TASK_*_DEFAULT`).
>> +type TaskLogBuffer = LogBuffer<LOG_BUFFER_SIZE, RM_LOG_BUFFER_NUM_PAGES>;
>> +
>> +/// Log buffer for a task that GSP-RM gives a single page.
>> +///
>> +/// Matches the size GSP-RM hardcodes for the root and RM state monitor tasks.
>> +type SmallLogBuffer = LogBuffer<GSP_PAGE_SIZE, 1>;
>>  
>> -impl LogBuffer {
>> +impl<const SIZE: usize, const NUM_PAGES: usize> LogBuffer<SIZE, NUM_PAGES> {
>>      /// Creates a new `LogBuffer` mapped on `dev`.
>>      fn new(dev: &device::Device<device::Bound>) -> Result<Self> {
>> +        build_assert!(SIZE == NUM_PAGES * GSP_PAGE_SIZE);
> 
> Why do we need to specify both NUM_PAGES and SIZE?  We can always derive one from the other.

OK yes. As long as we use NUM_PAGES, it works. I'll do that.

thanks,
-- 
John Hubbard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.