mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
VM: Get rid of KernelPagingScope.
Every page directory inherits the kernel page directory, so there's no need to explicitly enter the kernel's paging scope anymore.
This commit is contained in:
parent
00f291b090
commit
49768524d4
Notes:
sideshowbarker
2024-07-19 13:48:17 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/49768524d4c
2 changed files with 0 additions and 23 deletions
|
@ -454,12 +454,6 @@ void MemoryManager::enter_process_paging_scope(Process& process)
|
|||
asm volatile("movl %%eax, %%cr3"::"a"(process.page_directory().cr3()):"memory");
|
||||
}
|
||||
|
||||
void MemoryManager::enter_kernel_paging_scope()
|
||||
{
|
||||
InterruptDisabler disabler;
|
||||
asm volatile("movl %%eax, %%cr3"::"a"(kernel_page_directory().cr3()):"memory");
|
||||
}
|
||||
|
||||
void MemoryManager::flush_entire_tlb()
|
||||
{
|
||||
asm volatile(
|
||||
|
@ -666,14 +660,3 @@ ProcessPagingScope::~ProcessPagingScope()
|
|||
{
|
||||
MM.enter_process_paging_scope(current->process());
|
||||
}
|
||||
|
||||
KernelPagingScope::KernelPagingScope()
|
||||
{
|
||||
ASSERT(current);
|
||||
MM.enter_kernel_paging_scope();
|
||||
}
|
||||
|
||||
KernelPagingScope::~KernelPagingScope()
|
||||
{
|
||||
MM.enter_process_paging_scope(current->process());
|
||||
}
|
||||
|
|
|
@ -51,7 +51,6 @@ public:
|
|||
void populate_page_directory(PageDirectory&);
|
||||
|
||||
void enter_process_paging_scope(Process&);
|
||||
void enter_kernel_paging_scope();
|
||||
|
||||
bool validate_user_read(const Process&, LinearAddress) const;
|
||||
bool validate_user_write(const Process&, LinearAddress) const;
|
||||
|
@ -238,8 +237,3 @@ struct ProcessPagingScope {
|
|||
ProcessPagingScope(Process&);
|
||||
~ProcessPagingScope();
|
||||
};
|
||||
|
||||
struct KernelPagingScope {
|
||||
KernelPagingScope();
|
||||
~KernelPagingScope();
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue