diff options
author | Yinghai Lu <yinghai@kernel.org> | 2012-10-22 19:35:18 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2012-10-24 14:52:21 -0400 |
commit | 6ede1fd3cb404c0016de6ac529df46d561bd558b (patch) | |
tree | c5537b527a5a065fff2bd9b33d003561a0d87206 /arch/x86/kernel | |
parent | 94777fc51b3ad85ff9f705ddf7cdd0eb3bbad5a6 (diff) |
x86, mm: Trim memory in memblock to be page aligned
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>
Cc: <stable@vger.kernel.org>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/e820.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index ed858e9e9a74..df06ade26bef 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
@@ -1077,6 +1077,9 @@ void __init memblock_x86_fill(void) | |||
1077 | memblock_add(ei->addr, ei->size); | 1077 | memblock_add(ei->addr, ei->size); |
1078 | } | 1078 | } |
1079 | 1079 | ||
1080 | /* throw away partial pages */ | ||
1081 | memblock_trim_memory(PAGE_SIZE); | ||
1082 | |||
1080 | memblock_dump_all(); | 1083 | memblock_dump_all(); |
1081 | } | 1084 | } |
1082 | 1085 | ||