Fix unnecessary page table activation

This commit is contained in:
Qingsong Chen
2024-07-30 07:16:55 +00:00
committed by Tate, Hongliang Tian
parent 8dce83605f
commit b5f8e4e7bb

View File

@ -128,12 +128,12 @@ where
let last_activated_paddr = current_page_table_paddr();
activate_page_table(self.raw, CachePolicy::Writeback);
if last_activated_paddr == self.raw {
return;
}
activate_page_table(self.raw, CachePolicy::Writeback);
// Increment the reference count of the current page table.
self.inc_ref_count();