kernel_optimize_test/arch/powerpc/mm
Christophe Leroy 03bb2d6590 powerpc: get hugetlbpage handling more generic
Today there are two implementations of hugetlbpages which are managed
by exclusive #ifdefs:
* FSL_BOOKE: several directory entries points to the same single hugepage
* BOOK3S: one upper level directory entry points to a table of hugepages

In preparation of implementation of hugepage support on the 8xx, we
need a mix of the two above solutions, because the 8xx needs both cases
depending on the size of pages:
* In 4k page size mode, each PGD entry covers a 4M bytes area. It means
that 2 PGD entries will be necessary to cover an 8M hugepage while a
single PGD entry will cover 8x 512k hugepages.
* In 16 page size mode, each PGD entry covers a 64M bytes area. It means
that 8x 8M hugepages will be covered by one PGD entry and 64x 512k
hugepages will be covers by one PGD entry.

This patch:
* removes #ifdefs in favor of if/else based on the range sizes
* merges the two huge_pte_alloc() functions as they are pretty similar
* merges the two hugetlbpage_init() functions as they are pretty similar

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> (v3)
Signed-off-by: Scott Wood <oss@buserror.net>
2016-12-09 22:48:09 -06:00
..
8xx_mmu.c
40x_mmu.c
44x_mmu.c
copro_fault.c
dma-noncoherent.c
dump_hashpagetable.c powerpc/mm: Dump hash table 2016-11-17 17:11:47 +11:00
dump_linuxpagetables.c powerpc/mm: Dump linux pagetables 2016-11-17 17:11:46 +11:00
fault.c
fsl_booke_mmu.c
hash_low_32.S
hash_native_64.c
hash_utils_64.c
hash64_4k.c
hash64_64k.c
highmem.c
hugepage-hash64.c
hugetlbpage-book3e.c
hugetlbpage-hash64.c
hugetlbpage-radix.c
hugetlbpage.c powerpc: get hugetlbpage handling more generic 2016-12-09 22:48:09 -06:00
icswx_pid.c
icswx.c
icswx.h
init_32.c
init_64.c powerpc: port 64 bits pgtable_cache to 32 bits 2016-12-09 22:48:01 -06:00
init-common.c powerpc: port 64 bits pgtable_cache to 32 bits 2016-12-09 22:48:01 -06:00
Makefile powerpc: port 64 bits pgtable_cache to 32 bits 2016-12-09 22:48:01 -06:00
mem.c
mmap.c
mmu_context_book3s64.c
mmu_context_hash32.c
mmu_context_iommu.c
mmu_context_nohash.c
mmu_decl.h
numa.c
pgtable_32.c powerpc: port 64 bits pgtable_cache to 32 bits 2016-12-09 22:48:01 -06:00
pgtable_64.c
pgtable-book3e.c
pgtable-book3s64.c
pgtable-hash64.c
pgtable-radix.c powerpc/mm: Correct process and partition table max size 2016-11-17 17:11:53 +11:00
pgtable.c
ppc_mmu_32.c
slb_low.S
slb.c
slice.c
subpage-prot.c
tlb_hash32.c
tlb_hash64.c
tlb_low_64e.S
tlb_nohash_low.S
tlb_nohash.c
tlb-radix.c
vphn.c
vphn.h