Hello, Zhi,
On 1/21/2026 4:59 AM, Zhi Wang wrote:
> On Tue, 20 Jan 2026 15:42:51 -0500
> Joel Fernandes <[email protected]> wrote:
>
>> Add TLB (Translation Lookaside Buffer) flush support for GPU MMU.
>>
> The same concern as in PATCH 5, guess we need to think of concurrency for
> TLB flush.
Will change:
pub(crate) fn flush(&self, pdb_addr: VramAddress)
to:
pub(crate) fn flush(&mut self, pdb_addr: VramAddress)
and also changing in mm/mod.rs:
pub(crate) fn tlb(&self) -> &Tlb {
to:
pub(crate) fn tlb(&mut self) -> &mut Tlb.
Since TLB operations modify registers, that does make sense to me.
For the buddy allocator, however, I am locking internally so I left it as is:
/// Access the [`GpuBuddy`] allocator.
pub(crate) fn buddy(&self) -> &GpuBuddy {
&self.buddy
}
--
Joel Fernandes