Use cfg!() rather than #[cfg] for the cfg in map_memory
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user