fix: 解决创建buddy的函数栈帧过大的问题 (#1189)

* fix: 解决创建buddy的函数栈帧过大的问题

Signed-off-by: longjin <longjin@DragonOS.org>

* chore(kernel): 移除smoltcp的log依赖项

Signed-off-by: longjin <longjin@DragonOS.org>

---------

Signed-off-by: longjin <longjin@DragonOS.org>
This commit is contained in:
LoGin
2025-06-08 10:56:26 +08:00
committed by GitHub
parent 996150bbc4
commit e696ba4440
5 changed files with 19 additions and 9 deletions

View File

@ -151,11 +151,16 @@ pub struct X86_64SmpManager {
}
impl X86_64SmpManager {
pub const fn new() -> Self {
/// 创建一个新的X86_64SmpManager实例
///
/// 注:由于该函数只在编译时被调用,因此 `#[allow(clippy::large_stack_frames)]` 是安全的。
#[allow(clippy::large_stack_frames)]
const fn new() -> Self {
return Self {
ia64_cpu_to_sapicid: RwLock::new([None; PerCpu::MAX_CPU_NUM as usize]),
};
}
/// initialize the logical cpu number to APIC ID mapping
pub fn build_cpu_map(&self) -> Result<(), SystemError> {
// 参考https://code.dragonos.org.cn/xref/linux-6.1.9/arch/ia64/kernel/smpboot.c?fi=smp_build_cpu_map#496