The patch titled Subject: parisc/hugetlb: use pgtable-nopXd instead of 4level-fixup has been added to the -mm tree. Its filename is parisc-hugetlb-use-pgtable-nopxd-instead-of-4level-fixup.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/parisc-hugetlb-use-pgtable-nopxd-instead-of-4level-fixup.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/parisc-hugetlb-use-pgtable-nopxd-instead-of-4level-fixup.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: Helge Deller <deller@xxxxxx> Subject: parisc/hugetlb: use pgtable-nopXd instead of 4level-fixup Link: http://lkml.kernel.org/r/1572938135-31886-10-git-send-email-rppt@xxxxxxxxxx Signed-off-by: Helge Deller <deller@xxxxxx> Signed-off-by: Mike Rapoport <rppt@xxxxxxxxxxxxx> Cc: Anatoly Pugachev <matorola@xxxxxxxxx> Cc: Anton Ivanov <anton.ivanov@xxxxxxxxxxxxxxxxxx> Cc: Arnd Bergmann <arnd@xxxxxxxx> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx> Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> Cc: Greentime Hu <green.hu@xxxxxxxxx> Cc: Greg Ungerer <gerg@xxxxxxxxxxxxxx> Cc: "James E.J. Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> Cc: Jeff Dike <jdike@xxxxxxxxxxx> Cc: "Kirill A. Shutemov" <kirill@xxxxxxxxxxxxx> Cc: Mark Salter <msalter@xxxxxxxxxx> Cc: Matt Turner <mattst88@xxxxxxxxx> Cc: Michal Simek <monstr@xxxxxxxxx> Cc: Peter Rosin <peda@xxxxxxxxxx> Cc: Richard Weinberger <richard@xxxxxx> Cc: Rolf Eike Beer <eike-kernel@xxxxxxxxx> Cc: Russell King <linux@xxxxxxxxxxxxxxx> Cc: Russell King <rmk+kernel@xxxxxxxxxxxxxxx> Cc: Sam Creasey <sammy@xxxxxxxxx> Cc: Vincent Chen <deanbo422@xxxxxxxxx> Cc: Vineet Gupta <Vineet.Gupta1@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/parisc/mm/hugetlbpage.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) --- a/arch/parisc/mm/hugetlbpage.c~parisc-hugetlb-use-pgtable-nopxd-instead-of-4level-fixup +++ a/arch/parisc/mm/hugetlbpage.c @@ -49,6 +49,7 @@ pte_t *huge_pte_alloc(struct mm_struct * unsigned long addr, unsigned long sz) { pgd_t *pgd; + p4d_t *p4d; pud_t *pud; pmd_t *pmd; pte_t *pte = NULL; @@ -61,7 +62,8 @@ pte_t *huge_pte_alloc(struct mm_struct * addr &= HPAGE_MASK; pgd = pgd_offset(mm, addr); - pud = pud_alloc(mm, pgd, addr); + p4d = p4d_offset(pgd, addr); + pud = pud_alloc(mm, p4d, addr); if (pud) { pmd = pmd_alloc(mm, pud, addr); if (pmd) @@ -74,6 +76,7 @@ pte_t *huge_pte_offset(struct mm_struct unsigned long addr, unsigned long sz) { pgd_t *pgd; + p4d_t *p4d; pud_t *pud; pmd_t *pmd; pte_t *pte = NULL; @@ -82,11 +85,14 @@ pte_t *huge_pte_offset(struct mm_struct pgd = pgd_offset(mm, addr); if (!pgd_none(*pgd)) { - pud = pud_offset(pgd, addr); - if (!pud_none(*pud)) { - pmd = pmd_offset(pud, addr); - if (!pmd_none(*pmd)) - pte = pte_offset_map(pmd, addr); + p4d = p4d_offset(pgd, addr); + if (!p4d_none(*p4d)) { + pud = pud_offset(p4d, addr); + if (!pud_none(*pud)) { + pmd = pmd_offset(pud, addr); + if (!pmd_none(*pmd)) + pte = pte_offset_map(pmd, addr); + } } } return pte; _ Patches currently in -mm which might be from deller@xxxxxx are parisc-hugetlb-use-pgtable-nopxd-instead-of-4level-fixup.patch