x86/mm changes for v3.14
Linus,
Please pull the latest x86-mm-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-mm-for-linus
# HEAD: f3d815cb854b2f6262ade56a4d91a1ed3f1e50c4 x86/mm/numa: Fix 32-bit kernel NUMA boot
A cleanup, a fix and ASLR support for hugetlb mappings.
Thanks,
Ingo
------------------>
Cyrill Gorcunov (1):
x86/mm: Unify pte_to_pgoff() and pgoff_to_pte() helpers
Kirill A. Shutemov (1):
x86/mm: Implement ASLR for hugetlb mappings
Lans Zhang (1):
x86/mm/numa: Fix 32-bit kernel NUMA boot
arch/x86/include/asm/page.h | 1 + arch/x86/include/asm/page_32.h | 4 -- arch/x86/include/asm/pgtable-2level.h | 100 ++++++++++++++++++++-------------- arch/x86/mm/hugetlbpage.c | 9 +-- arch/x86/mm/numa.c | 10 +++- 5 files changed, 70 insertions(+), 54 deletions(-)
arch/x86/include/asm/page.h +1 -0
@@ -71,6 +71,7 @@ extern bool __virt_addr_valid(unsigned long kaddr);#include <asm-generic/getorder.h> #define __HAVE_ARCH_GATE_AREA 1 +#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA #endif /* __KERNEL__ */ #endif /* _ASM_X86_PAGE_H */
arch/x86/include/asm/page_32.h +0 -4
@@ -5,10 +5,6 @@#ifndef __ASSEMBLY__ -#ifdef CONFIG_HUGETLB_PAGE -#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA -#endif -#define __phys_addr_nodebug (x) ((x) - PAGE_OFFSET)#ifdef CONFIG_DEBUG_VIRTUAL extern unsigned long __phys_addr (unsigned long );
arch/x86/include/asm/pgtable-2level.h +59 -41
118 lines not on this page · raw message
arch/x86/mm/hugetlbpage.c +3 -6
@@ -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)
arch/x86/mm/numa.c +7 -3
@@ -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);