diff options
author | Yinghai Lu <yinghai@kernel.org> | 2012-10-22 16:35:18 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-31 10:02:56 -0700 |
commit | 368845fde9e704288f370df57988767aab6042b4 (patch) | |
tree | 0ba42c19ff563daa24bdc08c2c1d7cf3bbaabd7d /include | |
parent | c87ece5a158f3907193202d84f2a316a4c363768 (diff) | |
download | linux-3.10-368845fde9e704288f370df57988767aab6042b4.tar.gz linux-3.10-368845fde9e704288f370df57988767aab6042b4.tar.bz2 linux-3.10-368845fde9e704288f370df57988767aab6042b4.zip |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/memblock.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 19dc455b4f3..c948c440ea2 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h @@ -57,6 +57,7 @@ int memblock_add(phys_addr_t base, phys_addr_t size); int memblock_remove(phys_addr_t base, phys_addr_t size); int memblock_free(phys_addr_t base, phys_addr_t size); int memblock_reserve(phys_addr_t base, phys_addr_t size); +void memblock_trim_memory(phys_addr_t align); #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP void __next_mem_pfn_range(int *idx, int nid, unsigned long *out_start_pfn, |