Skip to content

Commit 8c8b1d9

Browse files
committed
rename MapperFlushRange::flush and add MapperFlushRange::flush_all
1 parent cf909a6 commit 8c8b1d9

File tree

1 file changed

+9
-2
lines changed
  • src/structures/paging/mapper

1 file changed

+9
-2
lines changed

src/structures/paging/mapper/mod.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -686,15 +686,22 @@ impl<S: PageSize> MapperFlushRange<S> {
686686
})
687687
}
688688

689-
/// Flush the page from the TLB to ensure that the newest mapping is used.
689+
/// Flush the pages from the TLB to ensure that the newest mapping is used.
690690
#[cfg(feature = "instructions")]
691691
#[inline]
692-
pub fn flush(self) {
692+
pub fn flush_range(self) {
693693
for page in self.0 {
694694
crate::instructions::tlb::flush(page.start_address())
695695
}
696696
}
697697

698+
/// Flush all pages from the TLB to ensure that the newest mapping is used.
699+
#[cfg(feature = "instructions")]
700+
#[inline]
701+
pub fn flush_all(self) {
702+
crate::instructions::tlb::flush_all()
703+
}
704+
698705
/// Don't flush the TLB and silence the “must be used” warning.
699706
#[inline]
700707
pub fn ignore(self) {}

0 commit comments

Comments
 (0)