Kernel: Make PageTable::s_fast_page_lock non-recursive

This lock is only used in wrapper of PageTable. There is no possiblity
of taking the lock outside of these wrappers.
This commit is contained in:
Bananymous 2024-05-24 14:12:35 +03:00
parent 7db7cfe20f
commit 2be4fe8404
2 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@ extern uint8_t g_userspace_end[];
namespace Kernel
{
RecursiveSpinLock PageTable::s_fast_page_lock;
SpinLock PageTable::s_fast_page_lock;
static PageTable* s_kernel = nullptr;
static bool s_has_nxe = false;
@ -214,7 +214,7 @@ namespace Kernel
ASSERT(s_kernel);
ASSERT(paddr);
SpinLockGuard _(s_fast_page_lock);
ASSERT(s_fast_page_lock.current_processor_has_lock());
constexpr vaddr_t uc_vaddr = uncanonicalize(fast_page());
constexpr uint64_t pml4e = (uc_vaddr >> 39) & 0x1FF;
@ -237,7 +237,7 @@ namespace Kernel
{
ASSERT(s_kernel);
SpinLockGuard _(s_fast_page_lock);
ASSERT(s_fast_page_lock.current_processor_has_lock());
constexpr vaddr_t uc_vaddr = uncanonicalize(fast_page());
constexpr uint64_t pml4e = (uc_vaddr >> 39) & 0x1FF;

View File

@ -130,7 +130,7 @@ namespace Kernel
private:
paddr_t m_highest_paging_struct { 0 };
mutable RecursiveSpinLock m_lock;
static RecursiveSpinLock s_fast_page_lock;
static SpinLock s_fast_page_lock;
};
static constexpr size_t range_page_count(vaddr_t start, size_t bytes)