powerpc/mm/hugetlb: Add support for reserving gigantic huge pages via kernel command...
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Fri, 28 Jul 2017 05:01:26 +0000 (10:31 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 16 Aug 2017 04:56:12 +0000 (14:56 +1000)
commit79cc38ded1e1ac86e69c90f604efadd50b0b3762
treeb7ec6f74be217b755dfa66908a84e70fed3a0cf3
parente24a1307ba1f99fc62a0bd61d5e87fcfb6d5503d
powerpc/mm/hugetlb: Add support for reserving gigantic huge pages via kernel command line

With commit aa888a74977a8 ("hugetlb: support larger than MAX_ORDER") we added
support for allocating gigantic hugepages via kernel command line. Switch
ppc64 arch specific code to use that.

W.r.t FSL support, we now limit our allocation range using BOOTMEM_ALLOC_ACCESSIBLE.

We use the kernel command line to do reservation of hugetlb pages on powernv
platforms. On pseries hash mmu mode the supported gigantic huge page size is
16GB and that can only be allocated with hypervisor assist. For pseries the
command line option doesn't do the allocation. Instead pseries does gigantic
hugepage allocation based on hypervisor hint that is specified via
"ibm,expected#pages" property of the memory node.

Cc: Scott Wood <oss@buserror.net>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/book3s/64/mmu-hash.h
arch/powerpc/include/asm/hugetlb.h
arch/powerpc/kernel/setup-common.c
arch/powerpc/mm/hash_utils_64.c
arch/powerpc/mm/hugetlbpage.c
arch/powerpc/mm/init_32.c