]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/8xx: Support 16k hugepages with 4k pages
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Mon, 31 Aug 2020 08:30:44 +0000 (08:30 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 15 Sep 2020 12:13:31 +0000 (22:13 +1000)
commit8e204bb48cb2b186472aa2db6a5b1687b8940da3
tree3590f1018a2b4121cf90bf81742a0b4d783fac22
parent8a5c3cb59753873b5cb994c44d912444c79fc275
powerpc/8xx: Support 16k hugepages with 4k pages

The 8xx has 4 page sizes: 4k, 16k, 512k and 8M

4k and 16k can be selected at build time as standard page sizes,
and 512k and 8M are hugepages.

When 4k standard pages are selected, 16k pages are not available.

Allow 16k pages as hugepages when 4k pages are used.

To allow that, implement arch_make_huge_pte() which receives
the necessary arguments to allow setting the PTE in accordance
with the page size:
- 512 k pages must have _PAGE_HUGE and _PAGE_SPS. They are set
by pte_mkhuge(). arch_make_huge_pte() does nothing.
- 16 k pages must have only _PAGE_SPS. arch_make_huge_pte() clears
_PAGE_HUGE.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/a518abc29266a708dfbccc8fce9ae6694fe4c2c6.1598862623.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/nohash/32/hugetlb-8xx.h
arch/powerpc/include/asm/nohash/32/pgtable.h
arch/powerpc/mm/hugetlbpage.c
arch/powerpc/mm/nohash/tlb.c
arch/powerpc/mm/ptdump/8xx.c
include/uapi/asm-generic/hugetlb_encode.h
include/uapi/linux/mman.h