Remove unused InactiveFlusher

This commit is contained in:
bjorn3
2026-04-03 21:17:28 +02:00
parent ab4abf63c9
commit 1352fafd00
7 changed files with 7 additions and 97 deletions
+7
View File
@@ -0,0 +1,7 @@
/// Initialize MAIR
#[cold]
pub unsafe fn init() {
unsafe {
rmm::aarch64::init_mair();
}
}
-23
View File
@@ -1,23 +0,0 @@
use crate::{
ipi::{ipi, IpiKind, IpiTarget},
memory::RmmA,
};
pub use rmm::{Flusher, PageFlush};
pub struct InactiveFlusher {
_inner: (),
}
impl Flusher<RmmA> for InactiveFlusher {
fn consume(&mut self, flush: PageFlush<RmmA>) {
// TODO: Push to TLB "mailbox" or tell it to reload CR3 if there are too many entries.
unsafe {
flush.ignore();
}
}
}
impl Drop for InactiveFlusher {
fn drop(&mut self) {
ipi(IpiKind::Tlb, IpiTarget::Other);
}
}
-12
View File
@@ -1,12 +0,0 @@
//! # Paging
//! Some code was borrowed from [Phil Opp's Blog](http://os.phil-opp.com/modifying-page-tables.html)
pub mod mapper;
/// Initialize MAIR
#[cold]
pub unsafe fn init() {
unsafe {
rmm::aarch64::init_mair();
}
}
@@ -1,7 +1,3 @@
#![allow(unused)]
pub mod mapper;
#[cold]
pub unsafe fn init() {
// Assuming SBI already set up PMAs correctly for us
-30
View File
@@ -1,30 +0,0 @@
use crate::{
ipi::{ipi, IpiKind, IpiTarget},
memory::RmmA,
};
pub use rmm::{Flusher, PageFlush, PageFlushAll};
pub struct InactiveFlusher {
_inner: (),
}
impl InactiveFlusher {
// TODO: cpu id
pub fn new() -> Self {
Self { _inner: () }
}
}
impl Flusher<RmmA> for InactiveFlusher {
fn consume(&mut self, flush: PageFlush<RmmA>) {
// TODO: Push to TLB "mailbox" or tell it to reload CR3 if there are too many entries.
unsafe {
flush.ignore();
}
}
}
impl Drop for InactiveFlusher {
fn drop(&mut self) {
ipi(IpiKind::Tlb, IpiTarget::Other);
}
}
@@ -1,8 +1,3 @@
//! # Paging
//! Some code was borrowed from [Phil Opp's Blog](http://os.phil-opp.com/modifying-page-tables.html)
pub mod mapper;
/// Initialize PAT
#[cold]
pub unsafe fn init() {
-23
View File
@@ -1,23 +0,0 @@
use crate::{
ipi::{ipi, IpiKind, IpiTarget},
memory::RmmA,
};
pub use rmm::{Flusher, PageFlush};
pub struct InactiveFlusher {
_inner: (),
}
impl Flusher<RmmA> for InactiveFlusher {
fn consume(&mut self, flush: PageFlush<RmmA>) {
// TODO: Push to TLB "mailbox" or tell it to reload CR3 if there are too many entries.
unsafe {
flush.ignore();
}
}
}
impl Drop for InactiveFlusher {
fn drop(&mut self) {
ipi(IpiKind::Tlb, IpiTarget::Other);
}
}