OpenCloudOS-Kernel/arch/powerpc/mm/nohash
Christophe Leroy e47168f3d1 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
2020-09-15 22:13:31 +10:00
..
8xx.c powerpc: Remove flush_instruction_cache() on 8xx 2020-09-02 11:00:22 +10:00
40x.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
44x.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
Makefile powerpc/fsl_booke/32: implement KASLR infrastructure 2019-11-13 19:27:40 +11:00
book3e_hugetlbpage.c powerpc/mm: move FSL_BOOK3 version of update_mmu_cache() 2019-08-20 21:22:14 +10:00
book3e_pgtable.c powerpc: add support for folded p4d page tables 2020-06-04 19:06:21 -07:00
fsl_booke.c powerpc: Rewrite FSL_BOOKE flush_cache_instruction() in C 2020-09-02 11:00:21 +10:00
kaslr_booke.c mm: remove unneeded includes of <asm/pgalloc.h> 2020-08-07 11:33:26 -07:00
mmu_context.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
tlb.c powerpc/8xx: Support 16k hugepages with 4k pages 2020-09-15 22:13:31 +10:00
tlb_low.S powerpc/fsl_booke: Avoid creating duplicate tlb1 entry 2020-03-17 23:40:35 +11:00
tlb_low_64e.S powerpc/64e: Drop dead BOOK3E_MMU_TLB_STATS code 2020-07-29 21:08:12 +10:00