Gate behind a feature flag

This commit is contained in:
R Aadarsh
2026-06-16 08:19:47 +05:30
parent 969c905d8e
commit 4106dcbbfa
6 changed files with 11 additions and 13 deletions
+2
View File
@@ -81,6 +81,7 @@ default = [
"acpi",
#"debugger",
"multi_core",
# "numa",
"serial_debug",
"self_modifying",
"x86_kvm_pv",
@@ -95,6 +96,7 @@ self_modifying = []
acpi = []
lpss_debug = []
multi_core = ["acpi"]
numa = ["multi_core"]
profiling = []
#TODO: remove when threading issues are fixed
pti = []
+2 -2
View File
@@ -20,11 +20,11 @@ mod rsdp;
mod rsdt;
mod rxsdt;
pub mod sdt;
#[cfg(any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64"))]
#[cfg(feature = "numa")]
pub mod slit;
#[cfg(target_arch = "aarch64")]
mod spcr;
#[cfg(any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64"))]
#[cfg(feature = "numa")]
pub mod srat;
mod xsdt;
+1
View File
@@ -69,6 +69,7 @@ mod log;
mod memory;
/// NUMA support
#[cfg(feature = "numa")]
mod numa;
/// Panic
+2 -9
View File
@@ -1,9 +1,5 @@
#[cfg(all(
feature = "acpi",
any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64")
))]
use crate::acpi;
use crate::{
acpi,
cpu_set::LogicalCpuId,
sync::{CleanLockToken, Mutex, L0},
};
@@ -41,10 +37,7 @@ pub fn init() {
NUMA_NODES.call_once(|| HashMap::new());
let mut flag = false;
#[cfg(all(
feature = "acpi",
any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64")
))]
#[cfg(any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64"))]
{
acpi::srat::init();
acpi::slit::init();
-1
View File
@@ -19,7 +19,6 @@ use crate::{
},
cpu_set::{LogicalCpuId, MAX_CPU_COUNT},
cpu_stats::{CpuStats, CpuStatsData},
numa::NumaNode,
ptrace::Session,
syscall::debug::SyscallDebugInfo,
};
+4 -1
View File
@@ -9,11 +9,13 @@ use crate::{
arch::interrupt,
context::{self, switch::SwitchResult},
memory::{PhysicalAddress, RmmA, RmmArch},
numa::{self, NUMA_NODES},
profiling, scheme,
sync::CleanLockToken,
};
#[cfg(feature = "numa")]
use crate::numa;
pub mod memory;
#[repr(C, packed(8))]
@@ -187,6 +189,7 @@ pub(crate) fn kmain(bootstrap: Bootstrap) -> ! {
}
}
#[cfg(feature = "numa")]
numa::init();
run_userspace(&mut token)