Patchwork Can not boot with CONFIG_NO_BOOTMEM=y on i686

login
register
mail settings
Submitter Yinghai Lu
Date March 26, 2010, 8:10 a.m.
Message ID <4BAC6C03.3030801@kernel.org>
Download mbox | patch
Permalink /patch/88437/
State New, archived
Headers show

Comments

Patch

Index: linux-2.6/arch/x86/mm/init.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/init.c
+++ linux-2.6/arch/x86/mm/init.c
@@ -334,6 +334,10 @@  void free_init_pages(char *what, unsigne
 {
 	unsigned long addr = begin;
 
+	/* Make sure boundaries are page aligned */
+	addr = PFN_UP(addr) << PAGE_SHIFT;
+	end = PFN_DOWN(end) << PAGE_SHIFT;
+
 	if (addr >= end)
 		return;