diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-06-01 17:51:48 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-06-01 17:51:48 +0200 |
commit | 49768524d4c3cdc5358c81e92062b9e89ec1e9d1 (patch) | |
tree | e2139f2dd4b6ec2cef5bbaa280bff2c3146cb32a | |
parent | 00f291b090ebb636d06a36604c9e39b2e7513e91 (diff) | |
download | serenity-49768524d4c3cdc5358c81e92062b9e89ec1e9d1.zip |
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.
-rw-r--r-- | Kernel/VM/MemoryManager.cpp | 17 | ||||
-rw-r--r-- | Kernel/VM/MemoryManager.h | 6 |
2 files changed, 0 insertions, 23 deletions
diff --git a/Kernel/VM/MemoryManager.cpp b/Kernel/VM/MemoryManager.cpp index 06e66f670b..b147bbfc06 100644 --- a/Kernel/VM/MemoryManager.cpp +++ b/Kernel/VM/MemoryManager.cpp @@ -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()); -} diff --git a/Kernel/VM/MemoryManager.h b/Kernel/VM/MemoryManager.h index b45cfcbf00..3413e57945 100644 --- a/Kernel/VM/MemoryManager.h +++ b/Kernel/VM/MemoryManager.h @@ -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(); -}; |