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

powerpc/mm/nohash: MM_SLICE is only used by book3s 64

BOOKE code is dead code as per the Kconfig details. So make it simpler
by enabling MM_SLICE only for book3s_64. The changes w.r.t nohash is just
removing deadcode. W.r.t ppc64, 4k without hugetlb will now enable MM_SLICE.
But that is good, because we reduce one extra variant which probably is not
getting tested much.

Reviewed-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Aneesh Kumar K.V and committed by
Michael Ellerman
b42279f0 adec9a2e

+1 -23
-5
arch/powerpc/include/asm/mmu-book3e.h
··· 229 229 unsigned int id; 230 230 unsigned int active; 231 231 unsigned long vdso_base; 232 - #ifdef CONFIG_PPC_MM_SLICES 233 - u64 low_slices_psize; /* SLB page size encodings */ 234 - u64 high_slices_psize; /* 4 bits per slice for now */ 235 - u16 user_psize; /* page size index */ 236 - #endif 237 232 #ifdef CONFIG_PPC_64K_PAGES 238 233 /* for 4K PTE fragment support */ 239 234 void *pte_frag;
-5
arch/powerpc/include/asm/nohash/64/pgtable.h
··· 88 88 #include <asm/nohash/pte-book3e.h> 89 89 #include <asm/pte-common.h> 90 90 91 - #ifdef CONFIG_PPC_MM_SLICES 92 - #define HAVE_ARCH_UNMAPPED_AREA 93 - #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN 94 - #endif /* CONFIG_PPC_MM_SLICES */ 95 - 96 91 #ifndef __ASSEMBLY__ 97 92 /* pte_clear moved to later in this file */ 98 93
-7
arch/powerpc/mm/hugetlbpage-book3e.c
··· 148 148 149 149 mm = vma->vm_mm; 150 150 151 - #ifdef CONFIG_PPC_MM_SLICES 152 - psize = get_slice_psize(mm, ea); 153 - tsize = mmu_get_tsize(psize); 154 - shift = mmu_psize_defs[psize].shift; 155 - #else 156 151 psize = vma_mmu_pagesize(vma); 157 152 shift = __ilog2(psize); 158 153 tsize = shift - 10; 159 - #endif 160 - 161 154 /* 162 155 * We can't be interrupted while we're setting up the MAS 163 156 * regusters or after we've confirmed that no tlb exists.
-5
arch/powerpc/mm/mmu_context_nohash.c
··· 333 333 334 334 mm->context.id = MMU_NO_CONTEXT; 335 335 mm->context.active = 0; 336 - 337 - #ifdef CONFIG_PPC_MM_SLICES 338 - slice_set_user_psize(mm, mmu_virtual_psize); 339 - #endif 340 - 341 336 return 0; 342 337 } 343 338
+1 -1
arch/powerpc/platforms/Kconfig.cputype
··· 359 359 360 360 config PPC_MM_SLICES 361 361 bool 362 - default y if (!PPC_FSL_BOOK3E && PPC64 && HUGETLB_PAGE) || (PPC_STD_MMU_64 && PPC_64K_PAGES) 362 + default y if PPC_STD_MMU_64 363 363 default n 364 364 365 365 config PPC_HAVE_PMU_SUPPORT