From ea724f45295b80a86f8a04b7d9b3eaac99366da8 Mon Sep 17 00:00:00 2001 From: Ruihan Li Date: Sat, 22 Mar 2025 23:53:42 +0800 Subject: [PATCH] Remove the time handler to flush TLBs --- ostd/src/boot/smp.rs | 2 -- ostd/src/lib.rs | 1 - ostd/src/mm/tlb.rs | 11 ----------- 3 files changed, 14 deletions(-) diff --git a/ostd/src/boot/smp.rs b/ostd/src/boot/smp.rs index 2d237996..37a1b304 100644 --- a/ostd/src/boot/smp.rs +++ b/ostd/src/boot/smp.rs @@ -136,8 +136,6 @@ fn ap_early_entry(local_apic_id: u32) -> ! { crate::arch::irq::enable_local(); - crate::mm::tlb::register_timer_callbacks_this_cpu(); - // SAFETY: this function is only called once on this AP. unsafe { crate::mm::kspace::activate_kernel_page_table(); diff --git a/ostd/src/lib.rs b/ostd/src/lib.rs index ed48d4f6..cb0cae0f 100644 --- a/ostd/src/lib.rs +++ b/ostd/src/lib.rs @@ -106,7 +106,6 @@ unsafe fn init() { boot::init_after_heap(); mm::dma::init(); - mm::tlb::register_timer_callbacks_this_cpu(); unsafe { arch::late_init_on_bsp() }; diff --git a/ostd/src/mm/tlb.rs b/ostd/src/mm/tlb.rs index e9e2b302..edf5798c 100644 --- a/ostd/src/mm/tlb.rs +++ b/ostd/src/mm/tlb.rs @@ -205,17 +205,6 @@ impl TlbFlushOp { } } -/// Registers the timer callbacks for the TLB flush operations. -/// -/// We check if there's pending TLB flush requests on each CPU in the timer -/// callback. This is to ensure that the TLB flush requests are processed -/// ultimately in case the IPIs are not received. -/// -/// This function should be done once for each CPU during the initialization. -pub(crate) fn register_timer_callbacks_this_cpu() { - crate::timer::register_callback(do_remote_flush); -} - // The queues of pending requests on each CPU. // // Lock ordering: lock FLUSH_OPS before PAGE_KEEPER.