powerpc/hugetlb: Fix 8M hugepages on 8xx
authorChristophe Leroy <christophe.leroy@c-s.fr>
Sun, 9 Feb 2020 16:02:41 +0000 (16:02 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Feb 2020 16:22:18 +0000 (17:22 +0100)
commit9b9374cf1ea7ff2a899ae6f7557a64458d3b23b3
treeab7b507c584ab4e26bc4ef8a0561a15fdfe0898e
parent723a44f2288e2e5075b0dab4a855f5dc28af7298
powerpc/hugetlb: Fix 8M hugepages on 8xx

commit 50a175dd18de7a647e72aca7daf4744e3a5a81e3 upstream.

With HW assistance all page tables must be 4k aligned, the 8xx drops
the last 12 bits during the walk.

Redefine HUGEPD_SHIFT_MASK to mask last 12 bits out. HUGEPD_SHIFT_MASK
is used to for alignment of page table cache.

Fixes: 22569b881d37 ("powerpc/8xx: Enable 8M hugepage support with HW assistance")
Cc: stable@vger.kernel.org # v5.0+
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/778b1a248c4c7ca79640eeff7740044da6a220a0.1581264115.git.christophe.leroy@c-s.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/include/asm/page.h