Gate behind a feature flag
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ mod log;
|
||||
mod memory;
|
||||
|
||||
/// NUMA support
|
||||
#[cfg(feature = "numa")]
|
||||
mod numa;
|
||||
|
||||
/// Panic
|
||||
|
||||
+2
-9
@@ -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();
|
||||
|
||||
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user