Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 mm changes from Ingo Molnar: "A cleanup, a fix and ASLR support for hugetlb mappings" * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm/numa: Fix 32-bit kernel NUMA boot x86/mm: Implement ASLR for hugetlb mappings x86/mm: Unify pte_to_pgoff() and pgoff_to_pte() helpers
This commit is contained in:
@@ -87,9 +87,7 @@ int pmd_huge_support(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* x86_64 also uses this file */
|
||||
|
||||
#ifdef HAVE_ARCH_HUGETLB_UNMAPPED_AREA
|
||||
#ifdef CONFIG_HUGETLB_PAGE
|
||||
static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *file,
|
||||
unsigned long addr, unsigned long len,
|
||||
unsigned long pgoff, unsigned long flags)
|
||||
@@ -99,7 +97,7 @@ static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *file,
|
||||
|
||||
info.flags = 0;
|
||||
info.length = len;
|
||||
info.low_limit = TASK_UNMAPPED_BASE;
|
||||
info.low_limit = current->mm->mmap_legacy_base;
|
||||
info.high_limit = TASK_SIZE;
|
||||
info.align_mask = PAGE_MASK & ~huge_page_mask(h);
|
||||
info.align_offset = 0;
|
||||
@@ -172,8 +170,7 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
|
||||
return hugetlb_get_unmapped_area_topdown(file, addr, len,
|
||||
pgoff, flags);
|
||||
}
|
||||
|
||||
#endif /*HAVE_ARCH_HUGETLB_UNMAPPED_AREA*/
|
||||
#endif /* CONFIG_HUGETLB_PAGE */
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
static __init int setup_hugepagesz(char *opt)
|
||||
|
@@ -211,9 +211,13 @@ static void __init setup_node_data(int nid, u64 start, u64 end)
|
||||
*/
|
||||
nd_pa = memblock_alloc_nid(nd_size, SMP_CACHE_BYTES, nid);
|
||||
if (!nd_pa) {
|
||||
pr_err("Cannot find %zu bytes in node %d\n",
|
||||
nd_size, nid);
|
||||
return;
|
||||
nd_pa = __memblock_alloc_base(nd_size, SMP_CACHE_BYTES,
|
||||
MEMBLOCK_ALLOC_ACCESSIBLE);
|
||||
if (!nd_pa) {
|
||||
pr_err("Cannot find %zu bytes in node %d\n",
|
||||
nd_size, nid);
|
||||
return;
|
||||
}
|
||||
}
|
||||
nd = __va(nd_pa);
|
||||
|
||||
|
Reference in New Issue
Block a user