From d92a8dd00d1567ca35fbb07a8006503ffea62528 Mon Sep 17 00:00:00 2001 From: bunnie Date: Wed, 29 May 2024 14:05:16 +0800 Subject: [PATCH] tweak backup stack space allocation in kernel now that we've tested on hw --- kernel/src/swap.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/src/swap.rs b/kernel/src/swap.rs index 285edc5d1..d6979dae0 100644 --- a/kernel/src/swap.rs +++ b/kernel/src/swap.rs @@ -20,7 +20,7 @@ use crate::services::SystemServices; /// invocation. So, if it works once, it should keep on working for that particular /// combination of target/link options/compiler version. #[cfg(any(feature = "debug-swap", feature = "debug-swap-verbose"))] // more stack needed for debug -const BACKUP_STACK_SIZE_WORDS: usize = 2048 / core::mem::size_of::(); +const BACKUP_STACK_SIZE_WORDS: usize = 1536 / core::mem::size_of::(); #[cfg(not(any(feature = "debug-swap", feature = "debug-swap-verbose")))] const BACKUP_STACK_SIZE_WORDS: usize = 1024 / core::mem::size_of::(); @@ -506,7 +506,7 @@ impl Swap { } } - #[cfg(feature = "debug-swap-verbose")] + #[cfg(feature = "debug-swap")] crate::arch::process::Process::with_current(|p| { println!( "BEF HANDLER {:x?} {}.{} sepc: {:x} sstatus: {:x?} satp: {:x?}",