diff options
author | Tejun Heo <tj@kernel.org> | 2011-04-04 18:23:48 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2011-04-06 20:56:52 -0400 |
commit | a6c24f7a705d939ddd2fcaa443fa3d8e852b933d (patch) | |
tree | 8d6589d63eb0eae9f5291b025dfd8c665fef52d2 /arch/x86/mm | |
parent | 3fe14ab541cd9b0d1f243afb7556046f12c8743c (diff) |
x86-32, numa: Align pgdat size while initializing alloc_remap
When pgdat is reserved in init_remap_allocator(), PAGE_SIZE aligned
size will be used. Match the size alignment in initialization to
avoid allocation failure down the road.
Signed-off-by: Tejun Heo <tj@kernel.org>
Link: http://lkml.kernel.org/r/1301955840-7246-3-git-send-email-tj@kernel.org
Acked-by: Yinghai Lu <yinghai@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/numa_32.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/mm/numa_32.c b/arch/x86/mm/numa_32.c index 84aac47c388..50e82507eab 100644 --- a/arch/x86/mm/numa_32.c +++ b/arch/x86/mm/numa_32.c | |||
@@ -287,7 +287,8 @@ static __init unsigned long calculate_numa_remap_pages(void) | |||
287 | node_end_pfn[nid] = max_pfn; | 287 | node_end_pfn[nid] = max_pfn; |
288 | 288 | ||
289 | /* ensure the remap includes space for the pgdat. */ | 289 | /* ensure the remap includes space for the pgdat. */ |
290 | size = node_remap_size[nid] + sizeof(pg_data_t); | 290 | size = node_remap_size[nid]; |
291 | size += ALIGN(sizeof(pg_data_t), PAGE_SIZE); | ||
291 | 292 | ||
292 | /* convert size to large (pmd size) pages, rounding up */ | 293 | /* convert size to large (pmd size) pages, rounding up */ |
293 | size = (size + LARGE_PAGE_BYTES - 1) / LARGE_PAGE_BYTES; | 294 | size = (size + LARGE_PAGE_BYTES - 1) / LARGE_PAGE_BYTES; |