]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
powerpc/mm/hugetlb: Handle hugepage size supported by hash config
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Mon, 28 Nov 2016 06:16:59 +0000 (11:46 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 28 Nov 2016 11:34:48 +0000 (22:34 +1100)
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>
arch/powerpc/include/asm/book3s/64/hugetlb.h

index 499268045306f5b62165f2510f6a1abeb3a5bcf7..d9c283f95e051d2cf261c8ca5ae6356352449e9d 100644 (file)
@@ -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;