x86, mm: Trim memory in memblock to be page aligned
authorYinghai Lu <yinghai@kernel.org>
Mon, 22 Oct 2012 23:35:18 +0000 (16:35 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Oct 2012 17:02:56 +0000 (10:02 -0700)
commit368845fde9e704288f370df57988767aab6042b4
tree0ba42c19ff563daa24bdc08c2c1d7cf3bbaabd7d
parentc87ece5a158f3907193202d84f2a316a4c363768
x86, mm: Trim memory in memblock to be page aligned

commit 6ede1fd3cb404c0016de6ac529df46d561bd558b upstream.

We will not map partial pages, so need to make sure memblock
allocation will not allocate those bytes out.

Also we will use for_each_mem_pfn_range() to loop to map memory
range to keep them consistent.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Link: http://lkml.kernel.org/r/CAE9FiQVZirvaBMFYRfXMmWEcHbKSicQEHz4VAwUv0xFCk51ZNw@mail.gmail.com
Acked-by: Jacob Shin <jacob.shin@amd.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/e820.c
include/linux/memblock.h
mm/memblock.c