powerpc/mm/hugetlb: initialize the pagetable cache correctly for hugetlb
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Fri, 30 Mar 2018 12:04:08 +0000 (17:34 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 4 Apr 2018 06:58:53 +0000 (16:58 +1000)
commit6fa504835d6969144b2bd3699684dd447c789ba2
tree7c4d5ba83317139477516e2e21bd0ad7c55e23d1
parentfb4e5dbd44564077fa0267a59b45961a1fd181b6
powerpc/mm/hugetlb: initialize the pagetable cache correctly for hugetlb

With 64k page size, we have hugetlb pte entries at the pmd and pud level for
book3s64. We don't need to create a separate page table cache for that. With 4k
we need to make sure hugepd page table cache for 16M is placed at PUD level
and 16G at the PGD level.

Simplify all these by not using HUGEPD_PD_SHIFT which is confusing for book3s64.

Without this patch, with 64k page size we create pagetable caches with shift
value 10 and 7 which are not used at all.

Fixes: 419df06eea5b ("powerpc: Reduce the PTE_INDEX_SIZE")

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/hugetlbpage.c