Commit ccf17c8b authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Michael Ellerman

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: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent bee8b3b5
...@@ -21,6 +21,10 @@ static inline int hstate_get_psize(struct hstate *hstate) ...@@ -21,6 +21,10 @@ static inline int hstate_get_psize(struct hstate *hstate)
return MMU_PAGE_2M; return MMU_PAGE_2M;
else if (shift == mmu_psize_defs[MMU_PAGE_1G].shift) else if (shift == mmu_psize_defs[MMU_PAGE_1G].shift)
return MMU_PAGE_1G; 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 { else {
WARN(1, "Wrong huge page shift\n"); WARN(1, "Wrong huge page shift\n");
return mmu_virtual_psize; return mmu_virtual_psize;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment