From 8fffa2911ab1502af0a5fab7210552b47e235cf4 Mon Sep 17 00:00:00 2001 From: Ravikiran G Thirumalai Date: Fri, 29 Jul 2005 14:03:28 -0700 Subject: [PATCH] --- yaml --- r: 5493 b: refs/heads/master c: 94d2ac66c12397e2ca7988dbf59f24a966d275cb h: refs/heads/master i: 5491: c0f9ae6b5662816e68392d41a36af92b1921fa4c v: v3 --- [refs] | 2 +- trunk/arch/i386/mm/discontig.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index a9a1a6853fe7..6cb200e76640 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 590f47a1d945c611530a85057e9ad7a3bbb50578 +refs/heads/master: 94d2ac66c12397e2ca7988dbf59f24a966d275cb diff --git a/trunk/arch/i386/mm/discontig.c b/trunk/arch/i386/mm/discontig.c index b358f0702a44..c369a8bf7cbe 100644 --- a/trunk/arch/i386/mm/discontig.c +++ b/trunk/arch/i386/mm/discontig.c @@ -243,6 +243,14 @@ static unsigned long calculate_numa_remap_pages(void) /* now the roundup is correct, convert to PAGE_SIZE pages */ size = size * PTRS_PER_PTE; + if (node_end_pfn[nid] & (PTRS_PER_PTE-1)) { + /* + * Adjust size if node_end_pfn is not on a proper + * pmd boundary. remap_numa_kva will barf otherwise. + */ + size += node_end_pfn[nid] & (PTRS_PER_PTE-1); + } + /* * Validate the region we are allocating only contains valid * pages.