aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRavikiran G Thirumalai <kiran@scalex86.org>2005-07-29 17:03:28 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-29 18:01:13 -0400
commit94d2ac66c12397e2ca7988dbf59f24a966d275cb (patch)
treec0d7b9f7654bb83da63a28b2609b03c442ca09f8 /arch
parent590f47a1d945c611530a85057e9ad7a3bbb50578 (diff)
[PATCH] mm: Ensure proper alignment for node_remap_start_pfn
While reserving KVA for lmem_maps of node, we have to make sure that node_remap_start_pfn[] is aligned to a proper pmd boundary. (node_remap_start_pfn[] gets its value from node_end_pfn[]) Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org> Signed-off-by: Shai Fultheim <shai@scalex86.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/mm/discontig.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c
index b358f0702a44..c369a8bf7cbe 100644
--- a/arch/i386/mm/discontig.c
+++ b/arch/i386/mm/discontig.c
@@ -243,6 +243,14 @@ static unsigned long calculate_numa_remap_pages(void)
243 /* now the roundup is correct, convert to PAGE_SIZE pages */ 243 /* now the roundup is correct, convert to PAGE_SIZE pages */
244 size = size * PTRS_PER_PTE; 244 size = size * PTRS_PER_PTE;
245 245
246 if (node_end_pfn[nid] & (PTRS_PER_PTE-1)) {
247 /*
248 * Adjust size if node_end_pfn is not on a proper
249 * pmd boundary. remap_numa_kva will barf otherwise.
250 */
251 size += node_end_pfn[nid] & (PTRS_PER_PTE-1);
252 }
253
246 /* 254 /*
247 * Validate the region we are allocating only contains valid 255 * Validate the region we are allocating only contains valid
248 * pages. 256 * pages.