From b1a8b6fdae74f4bad5424456693a909a02b4d610 Mon Sep 17 00:00:00 2001 From: bunnie Date: Sun, 18 May 2025 04:33:49 +0800 Subject: [PATCH] cleanup some debug --- kernel/src/swap.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/src/swap.rs b/kernel/src/swap.rs index eea91265c..99a596c95 100644 --- a/kernel/src/swap.rs +++ b/kernel/src/swap.rs @@ -685,7 +685,7 @@ impl Swap { let target_pid = crate::arch::process::current_pid(); let target_tid = crate::arch::process::current_tid(); - // #[cfg(feature = "debug-swap-verbose")] + #[cfg(feature = "debug-swap-verbose")] println!( "write_page - userspace activate for pid{:?}/tid{:?} for vaddr {:x?} -> offset {:x?}", target_pid, target_tid, page_vaddr_in_swapper, flash_offset @@ -803,7 +803,7 @@ impl Swap { // release the page from the swapper's address space MemoryManager::with_mut(|mm| { let paddr = crate::arch::mem::virt_to_phys(swap_vaddr).unwrap() as usize; - // #[cfg(feature = "debug-swap-verbose")] + #[cfg(feature = "debug-swap-verbose")] println!("Release flash backing page - paddr {:x}", paddr); // this call unmaps the virtual page from the page table crate::arch::mem::unmap_page_inner(mm, swap_vaddr).expect("couldn't unmap page"); @@ -815,7 +815,6 @@ impl Swap { }); // Unhalt IRQs - println!("WriteToFlash exit - restore IRQ"); self.swap_restore_irq(); (pid, tid) }