aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/mm/numa_32.c
diff options
context:
space:
mode:
authorTejun Heo <[email protected]>2011-04-05 00:23:48 +0200
committerH. Peter Anvin <[email protected]>2011-04-06 17:56:52 -0700
commita6c24f7a705d939ddd2fcaa443fa3d8e852b933d (patch)
tree8d6589d63eb0eae9f5291b025dfd8c665fef52d2 /arch/x86/mm/numa_32.c
parent3fe14ab541cd9b0d1f243afb7556046f12c8743c (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 <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Acked-by: Yinghai Lu <[email protected]> Cc: David Rientjes <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
Diffstat (limited to 'arch/x86/mm/numa_32.c')
-rw-r--r--arch/x86/mm/numa_32.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/mm/numa_32.c b/arch/x86/mm/numa_32.c
index 84aac47c3887..50e82507eab4 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)
node_end_pfn[nid] = max_pfn;
/* ensure the remap includes space for the pgdat. */
- size = node_remap_size[nid] + sizeof(pg_data_t);
+ size = node_remap_size[nid];
+ size += ALIGN(sizeof(pg_data_t), PAGE_SIZE);
/* convert size to large (pmd size) pages, rounding up */
size = (size + LARGE_PAGE_BYTES - 1) / LARGE_PAGE_BYTES;