Kernel/MM: Remove PageTableEntry::raw()

Similar to the previous commit, nothing outside of the PageTableEntry
classes uses this function.

RISC-V's PageTableEntry doesn't have it at all.
This commit is contained in:
Sönke Holz
2026-04-06 20:42:40 +02:00
committed by Sönke Holz
parent b8e87b51dd
commit 3c8d66d950
2 changed files with 9 additions and 13 deletions

View File

@@ -115,19 +115,17 @@ public:
m_raw |= normal_memory_flags;
}
u64 raw() const { return m_raw; }
enum Flags {
Present = 1 << 0,
};
bool is_present() const { return (raw() & Present) == Present; }
bool is_present() const { return (m_raw & Present) == Present; }
void set_present(bool b) { set_bit(Present, b); }
bool is_user_allowed() const { return (raw() & ACCESS_PERMISSION_EL0) == ACCESS_PERMISSION_EL0; }
bool is_user_allowed() const { return (m_raw & ACCESS_PERMISSION_EL0) == ACCESS_PERMISSION_EL0; }
void set_user_allowed(bool b) { set_bit(ACCESS_PERMISSION_EL0, b); }
bool is_writable() const { return !((raw() & ACCESS_PERMISSION_READONLY) == ACCESS_PERMISSION_READONLY); }
bool is_writable() const { return !((m_raw & ACCESS_PERMISSION_READONLY) == ACCESS_PERMISSION_READONLY); }
void set_writable(bool b) { set_bit(ACCESS_PERMISSION_READONLY, !b); }
void set_memory_type(MemoryType t)
@@ -144,7 +142,7 @@ public:
bool is_global() const { TODO_AARCH64(); }
void set_global(bool) { }
bool is_execute_disabled() const { return (raw() & EXECUTE_NEVER) == EXECUTE_NEVER; }
bool is_execute_disabled() const { return (m_raw & EXECUTE_NEVER) == EXECUTE_NEVER; }
void set_execute_disabled(bool b) { set_bit(EXECUTE_NEVER, b); }
bool is_null() const { return m_raw == 0; }

View File

@@ -98,8 +98,6 @@ public:
m_raw |= value & PAGING_STRUCTURE_ENTRY_PADDR_MASK;
}
u64 raw() const { return m_raw; }
enum Flags {
Present = 1 << 0,
ReadWrite = 1 << 1,
@@ -111,13 +109,13 @@ public:
NoExecute = 0x8000000000000000ULL,
};
bool is_present() const { return (raw() & Present) == Present; }
bool is_present() const { return (m_raw & Present) == Present; }
void set_present(bool b) { set_bit(Present, b); }
bool is_user_allowed() const { return (raw() & UserSupervisor) == UserSupervisor; }
bool is_user_allowed() const { return (m_raw & UserSupervisor) == UserSupervisor; }
void set_user_allowed(bool b) { set_bit(UserSupervisor, b); }
bool is_writable() const { return (raw() & ReadWrite) == ReadWrite; }
bool is_writable() const { return (m_raw & ReadWrite) == ReadWrite; }
void set_writable(bool b) { set_bit(ReadWrite, b); }
void set_memory_type(MemoryType t)
@@ -145,10 +143,10 @@ public:
}
}
bool is_global() const { return (raw() & Global) == Global; }
bool is_global() const { return (m_raw & Global) == Global; }
void set_global(bool b) { set_bit(Global, b); }
bool is_execute_disabled() const { return (raw() & NoExecute) == NoExecute; }
bool is_execute_disabled() const { return (m_raw & NoExecute) == NoExecute; }
void set_execute_disabled(bool b) { set_bit(NoExecute, b); }
bool is_null() const { return m_raw == 0; }