提交 94d2ac66 编写于 作者: R Ravikiran G Thirumalai 提交者: Linus Torvalds

[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: NRavikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: NShai Fultheim <shai@scalex86.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 590f47a1
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册