Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Will Deacon:
"I thought we were done for 4.5, but then the 64k-page chaps came
crawling out of the woodwork. *sigh*

The vmemmap fix I sent for -rc7 caused a regression with 64k pages and
sparsemem and at some point during the release cycle the new hugetlb
code using contiguous ptes started failing the libhugetlbfs tests with
64k pages enabled.

So here are a couple of patches that fix the vmemmap alignment and
disable the new hugetlb page sizes whilst a proper fix is being
developed:

- Temporarily disable huge pages built using contiguous ptes

- Ensure vmemmap region is sufficiently aligned for sparsemem
sections"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
arm64: hugetlb: partial revert of 66b3923a1a0f
arm64: account for sparsemem section alignment when choosing vmemmap offset

+3 -16
+3 -2
arch/arm64/include/asm/pgtable.h
··· 40 40 * VMALLOC_END: extends to the available space below vmmemmap, PCI I/O space, 41 41 * fixed mappings and modules 42 42 */ 43 - #define VMEMMAP_SIZE ALIGN((1UL << (VA_BITS - PAGE_SHIFT - 1)) * sizeof(struct page), PUD_SIZE) 43 + #define VMEMMAP_SIZE ALIGN((1UL << (VA_BITS - PAGE_SHIFT)) * sizeof(struct page), PUD_SIZE) 44 44 45 45 #ifndef CONFIG_KASAN 46 46 #define VMALLOC_START (VA_START) ··· 52 52 #define VMALLOC_END (PAGE_OFFSET - PUD_SIZE - VMEMMAP_SIZE - SZ_64K) 53 53 54 54 #define VMEMMAP_START (VMALLOC_END + SZ_64K) 55 - #define vmemmap ((struct page *)VMEMMAP_START - (memstart_addr >> PAGE_SHIFT)) 55 + #define vmemmap ((struct page *)VMEMMAP_START - \ 56 + SECTION_ALIGN_DOWN(memstart_addr >> PAGE_SHIFT)) 56 57 57 58 #define FIRST_USER_ADDRESS 0UL 58 59
-14
arch/arm64/mm/hugetlbpage.c
··· 306 306 hugetlb_add_hstate(PMD_SHIFT - PAGE_SHIFT); 307 307 } else if (ps == PUD_SIZE) { 308 308 hugetlb_add_hstate(PUD_SHIFT - PAGE_SHIFT); 309 - } else if (ps == (PAGE_SIZE * CONT_PTES)) { 310 - hugetlb_add_hstate(CONT_PTE_SHIFT); 311 - } else if (ps == (PMD_SIZE * CONT_PMDS)) { 312 - hugetlb_add_hstate((PMD_SHIFT + CONT_PMD_SHIFT) - PAGE_SHIFT); 313 309 } else { 314 310 pr_err("hugepagesz: Unsupported page size %lu K\n", ps >> 10); 315 311 return 0; ··· 313 317 return 1; 314 318 } 315 319 __setup("hugepagesz=", setup_hugepagesz); 316 - 317 - #ifdef CONFIG_ARM64_64K_PAGES 318 - static __init int add_default_hugepagesz(void) 319 - { 320 - if (size_to_hstate(CONT_PTES * PAGE_SIZE) == NULL) 321 - hugetlb_add_hstate(CONT_PMD_SHIFT); 322 - return 0; 323 - } 324 - arch_initcall(add_default_hugepagesz); 325 - #endif