diff options
author | Tom <tomut@yahoo.com> | 2020-06-28 16:04:35 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-01 12:07:01 +0200 |
commit | 2a38cc9a1267ec6c6e859a0fe72f02a5a145fa9b (patch) | |
tree | caac07e683992aca0531509ae3ccd2b03dfec734 /Kernel/VM/MemoryManager.h | |
parent | d249b5df8f03949040f5a4ddfe5b2f7b9b4b1740 (diff) | |
download | serenity-2a38cc9a1267ec6c6e859a0fe72f02a5a145fa9b.zip |
Kernel: Add a quickmap region for each processor
Threads need to be able to concurrently quickmap things.
Diffstat (limited to 'Kernel/VM/MemoryManager.h')
-rw-r--r-- | Kernel/VM/MemoryManager.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Kernel/VM/MemoryManager.h b/Kernel/VM/MemoryManager.h index 6c27ca766e..c9e72fd1bc 100644 --- a/Kernel/VM/MemoryManager.h +++ b/Kernel/VM/MemoryManager.h @@ -67,6 +67,10 @@ class SynthFSInode; #define MM Kernel::MemoryManager::the() +struct MemoryManagerData { + SpinLock<u8> m_quickmap_in_use; +}; + class MemoryManager { AK_MAKE_ETERNAL friend class PageDirectory; @@ -80,7 +84,12 @@ class MemoryManager { public: static MemoryManager& the(); - static void initialize(); + static void initialize(u32 cpu); + + static inline MemoryManagerData& get_data() + { + return Processor::current().get_mm_data(); + } PageFaultResponse handle_page_fault(const PageFault&); @@ -204,8 +213,6 @@ private: static RecursiveSpinLock s_lock; - bool m_quickmap_in_use { false }; - RefPtr<PhysicalPage> m_low_pseudo_identity_mapping_pages[4]; }; |