summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2016-11-28 11:46:59 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2016-11-28 22:34:48 +1100
commitccf17c8b5c8465750a6c514be9ef6f5b156b6c67 (patch)
tree6ff24b659ca86dcf599dab9b26b5cc59a63e7286
parentbee8b3b56d1dfc4075254a61340ee3898a732e63 (diff)
downloadop-kernel-dev-ccf17c8b5c8465750a6c514be9ef6f5b156b6c67.zip
op-kernel-dev-ccf17c8b5c8465750a6c514be9ef6f5b156b6c67.tar.gz
powerpc/mm/hugetlb: Handle hugepage size supported by hash config
W.r.t hash page table config, we support 16MB and 16GB as the hugepage size. Update the hstate_get_psize to handle 16M and 16G. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/include/asm/book3s/64/hugetlb.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/book3s/64/hugetlb.h b/arch/powerpc/include/asm/book3s/64/hugetlb.h
index 4992680..d9c283f 100644
--- a/arch/powerpc/include/asm/book3s/64/hugetlb.h
+++ b/arch/powerpc/include/asm/book3s/64/hugetlb.h
@@ -21,6 +21,10 @@ static inline int hstate_get_psize(struct hstate *hstate)
return MMU_PAGE_2M;
else if (shift == mmu_psize_defs[MMU_PAGE_1G].shift)
return MMU_PAGE_1G;
+ else if (shift == mmu_psize_defs[MMU_PAGE_16M].shift)
+ return MMU_PAGE_16M;
+ else if (shift == mmu_psize_defs[MMU_PAGE_16G].shift)
+ return MMU_PAGE_16G;
else {
WARN(1, "Wrong huge page shift\n");
return mmu_virtual_psize;
OpenPOWER on IntegriCloud