Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

powerpc/mm: Move vma_mmu_pagesize()

vma_mmu_pagesize() is only required for slices,
otherwise there is a generic weak version doing the
exact same thing.

Move it to slice.c

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/1302e000d529c93d07208f1fae90f938e7a551b4.1649523076.git.christophe.leroy@csgroup.eu

authored by

Christophe Leroy and committed by
Michael Ellerman
93ea9102 2cb4de08

+9 -11
-11
arch/powerpc/mm/hugetlbpage.c
··· 565 565 } 566 566 #endif 567 567 568 - unsigned long vma_mmu_pagesize(struct vm_area_struct *vma) 569 - { 570 - /* With radix we don't use slice, so derive it from vma*/ 571 - if (IS_ENABLED(CONFIG_PPC_MM_SLICES) && !radix_enabled()) { 572 - unsigned int psize = get_slice_psize(vma->vm_mm, vma->vm_start); 573 - 574 - return 1UL << mmu_psize_to_shift(psize); 575 - } 576 - return vma_kernel_pagesize(vma); 577 - } 578 - 579 568 bool __init arch_hugetlb_valid_size(unsigned long size) 580 569 { 581 570 int shift = __ffs(size);
+9
arch/powerpc/mm/slice.c
··· 759 759 760 760 return !slice_check_range_fits(mm, maskp, addr, len); 761 761 } 762 + 763 + unsigned long vma_mmu_pagesize(struct vm_area_struct *vma) 764 + { 765 + /* With radix we don't use slice, so derive it from vma*/ 766 + if (radix_enabled()) 767 + return vma_kernel_pagesize(vma); 768 + 769 + return 1UL << mmu_psize_to_shift(get_slice_psize(vma->vm_mm, vma->vm_start)); 770 + } 762 771 #endif