aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bits64/paging.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bits64/paging.rs b/src/bits64/paging.rs
index 47ac8ed..8858de8 100644
--- a/src/bits64/paging.rs
+++ b/src/bits64/paging.rs
@@ -74,6 +74,7 @@ pub type PD = [PDEntry; 512];
pub type PT = [PTEntry; 512];
/// Given virtual address calculate corresponding entry in PML4.
+#[inline]
pub fn pml4_index(addr: VAddr) -> usize {
(addr.as_usize() >> 39) & 0b111111111
}