Use cfg!() rather than #[cfg] for the cfg in map_memory

This commit is contained in:
bjorn3
2025-09-07 13:26:04 +02:00
parent e42fc3811f
commit c404598296
+1 -2
View File
@@ -276,8 +276,7 @@ unsafe fn map_memory<A: Arch>(areas: &[MemoryArea], mut bump_allocator: &mut Bum
let mut mapper = PageMapper::<A, _>::create(TableKind::Kernel, &mut bump_allocator)
.expect("failed to create Mapper");
#[cfg(target_arch = "x86")]
{
if cfg!(target_arch = "x86") {
// Pre-allocate all kernel PD entries so that when the page table is copied,
// these entries are synced between processes
for i in 512..1024 {