Kernel: Remove "supervisor" bit from PhysicalPage

Instead of each PhysicalPage knowing whether it comes from the
supervisor pages or from the user pages, we can just check in both
sets when freeing a page.

It's just a handful of pointer range checks, nothing expensive.
This commit is contained in:
Andreas Kling 2021-07-11 23:12:32 +02:00
commit c2792212f4
Notes: sideshowbarker 2024-07-18 09:12:26 +09:00
9 changed files with 39 additions and 53 deletions

View file

@ -106,7 +106,7 @@ AnonymousVMObject::AnonymousVMObject(PhysicalAddress paddr, size_t size)
{
VERIFY(paddr.page_base() == paddr);
for (size_t i = 0; i < page_count(); ++i)
physical_pages()[i] = PhysicalPage::create(paddr.offset(i * PAGE_SIZE), false, false);
physical_pages()[i] = PhysicalPage::create(paddr.offset(i * PAGE_SIZE), false);
}
AnonymousVMObject::AnonymousVMObject(PhysicalPage& page)