The patch titled Subject: arm64/hugetlb: fix hugetlb initialization has been added to the -mm tree. Its filename is hugetlbfs-remove-hugetlb_add_hstate-warning-for-existing-hstate-fix.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/hugetlbfs-remove-hugetlb_add_hstate-warning-for-existing-hstate-fix.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/hugetlbfs-remove-hugetlb_add_hstate-warning-for-existing-hstate-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Mike Kravetz <mike.kravetz@xxxxxxxxxx> Subject: arm64/hugetlb: fix hugetlb initialization When calling hugetlb_add_hstate() to initialize a new hugetlb size, be sure to use correct huge pages size order. Link: http://lkml.kernel.org/r/4c36c6ce-3774-78fa-abc4-b7346bf24348@xxxxxxxxxx Signed-off-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx> Reported-by: Qian Cai <cai@xxxxxx> Reported-by: Anders Roxell <anders.roxell@xxxxxxxxxx> Cc: Mina Almasry <almasrymina@xxxxxxxxxx> Cc: Albert Ou <aou@xxxxxxxxxxxxxxxxx> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Cc: Catalin Marinas <catalin.marinas@xxxxxxx> Cc: Christian Borntraeger <borntraeger@xxxxxxxxxx> Cc: Christophe Leroy <christophe.leroy@xxxxxx> Cc: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx> Cc: David S. Miller <davem@xxxxxxxxxxxxx> Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Jonathan Corbet <corbet@xxxxxxx> Cc: Longpeng <longpeng2@xxxxxxxxxx> Cc: Nitesh Narayan Lal <nitesh@xxxxxxxxxx> Cc: Palmer Dabbelt <palmer@xxxxxxxxxxx> Cc: Paul Mackerras <paulus@xxxxxxxxx> Cc: Paul Walmsley <paul.walmsley@xxxxxxxxxx> Cc: Peter Xu <peterx@xxxxxxxxxx> Cc: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Vasily Gorbik <gor@xxxxxxxxxxxxx> Cc: Will Deacon <will@xxxxxxxxxx> Cc: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/arm64/mm/hugetlbpage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/arm64/mm/hugetlbpage.c~hugetlbfs-remove-hugetlb_add_hstate-warning-for-existing-hstate-fix +++ a/arch/arm64/mm/hugetlbpage.c @@ -455,9 +455,9 @@ static int __init hugetlbpage_init(void) #ifdef CONFIG_ARM64_4K_PAGES hugetlb_add_hstate(PUD_SHIFT - PAGE_SHIFT); #endif - hugetlb_add_hstate(CONT_PMD_SHIFT - PAGE_SHIFT); + hugetlb_add_hstate((CONT_PMD_SHIFT + PMD_SHIFT) - PAGE_SHIFT); hugetlb_add_hstate(PMD_SHIFT - PAGE_SHIFT); - hugetlb_add_hstate(CONT_PTE_SHIFT - PAGE_SHIFT); + hugetlb_add_hstate((CONT_PTE_SHIFT + PAGE_SHIFT) - PAGE_SHIFT); return 0; } _ Patches currently in -mm which might be from mike.kravetz@xxxxxxxxxx are hugetlbfs-add-arch_hugetlb_valid_size.patch hugetlbfs-move-hugepagesz=-parsing-to-arch-independent-code.patch hugetlbfs-remove-hugetlb_add_hstate-warning-for-existing-hstate.patch hugetlbfs-remove-hugetlb_add_hstate-warning-for-existing-hstate-fix.patch hugetlbfs-clean-up-command-line-processing.patch