powerpc/mm: Fix vma_mmu_pagesize() for radix
Radix doesn't use the slice framework to find the page size. Hence use vma to find the page size. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
5ed7ecd08a
commit
2f5f0dfd1e
1 changed files with 4 additions and 4 deletions
|
|
@ -719,14 +719,14 @@ unsigned long vma_mmu_pagesize(struct vm_area_struct *vma)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_PPC_MM_SLICES
|
#ifdef CONFIG_PPC_MM_SLICES
|
||||||
unsigned int psize = get_slice_psize(vma->vm_mm, vma->vm_start);
|
unsigned int psize = get_slice_psize(vma->vm_mm, vma->vm_start);
|
||||||
|
/* With radix we don't use slice, so derive it from vma*/
|
||||||
return 1UL << mmu_psize_to_shift(psize);
|
if (!radix_enabled())
|
||||||
#else
|
return 1UL << mmu_psize_to_shift(psize);
|
||||||
|
#endif
|
||||||
if (!is_vm_hugetlb_page(vma))
|
if (!is_vm_hugetlb_page(vma))
|
||||||
return PAGE_SIZE;
|
return PAGE_SIZE;
|
||||||
|
|
||||||
return huge_page_size(hstate_vma(vma));
|
return huge_page_size(hstate_vma(vma));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool is_power_of_4(unsigned long x)
|
static inline bool is_power_of_4(unsigned long x)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue