Skip to contentSkip to conversation

x86, efi: free memory with the correct call

PATCH New Maarten Lankhorst 1 participant 1 message Jun 6, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86, efi: free memory with the correct call

Commit 916f676f8dc introduced a call to free_bootmem_late while it reserves memory with memblock_x64_reserve_range
Fix this call to silence the swapper BUGs:

BUG: Bad page state in process swapper  pfn:00000
---
 arch/x86/platform/efi/efi.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
arch/x86/platform/efi/efi.c +1 -2
index 0d3a4fa..d2eefaa 100644
@@ -29,7 +29,6 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/efi.h>
-#include <linux/bootmem.h>
 #include <linux/memblock.h>
 #include <linux/spinlock.h>
 #include <linux/uaccess.h>
@@ -334,7 +333,7 @@ static void __init efi_free_boot_services(void)
 		    md->type != EFI_BOOT_SERVICES_DATA)
 			continue;
 
-		free_bootmem_late(start, size);
+		memblock_x86_free_memory_in_range(start, start + size);
 	}
 }
 
Signature · 1 line
1.7.4.1