tree c0d7b9f7654bb83da63a28b2609b03c442ca09f8 parent 590f47a1d945c611530a85057e9ad7a3bbb50578 author Ravikiran G Thirumalai <[EMAIL PROTECTED]> Sat, 30 Jul 2005 04:03:28 -0700 committer Linus Torvalds <[EMAIL PROTECTED]> Sat, 30 Jul 2005 05:01:13 -0700
[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 <[EMAIL PROTECTED]> Signed-off-by: Shai Fultheim <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> arch/i386/mm/discontig.c | 8 ++++++++ 1 files changed, 8 insertions(+) diff --git a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c --- a/arch/i386/mm/discontig.c +++ b/arch/i386/mm/discontig.c @@ -243,6 +243,14 @@ static unsigned long calculate_numa_rema /* 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. - To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html