powerpc/mm/radix: Use the right page size for vmemmap mapping
authorAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Mon, 1 Jul 2019 14:34:42 +0000 (20:04 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Sep 2019 05:14:09 +0000 (07:14 +0200)
commita49808a8f18f3b7e56a512245522dc020b0d4bd2
tree5b0b178ae250d76a9176ef05d786cf89ecaf16e2
parent27d3d8cdf804d2e8e625f4ead09212877eae4208
powerpc/mm/radix: Use the right page size for vmemmap mapping

commit 89a3496e0664577043666791ec07fb731d57c950 upstream.

We use mmu_vmemmap_psize to find the page size for mapping the vmmemap area.
With radix translation, we are suboptimally setting this value to PAGE_SIZE.

We do check for 2M page size support and update mmu_vmemap_psize to use
hugepage size but we suboptimally reset the value to PAGE_SIZE in
radix__early_init_mmu(). This resulted in always mapping vmemmap area with
64K page size.

Fixes: 2bfd65e45e87 ("powerpc/mm/radix: Add radix callbacks for early init routines")
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/mm/pgtable-radix.c