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: Remove CONFIG_PPC_MM_SLICES

CONFIG_PPC_MM_SLICES is always selected by hash book3s/64.
CONFIG_PPC_MM_SLICES is never selected by other platforms.

Remove it.

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/dc2cdc204de8978574bf7c02329b6cfc4db0bce7.1649523076.git.christophe.leroy@csgroup.eu

authored by

Christophe Leroy and committed by
Michael Ellerman
f693d38d 1408fca0

+5 -36
+1 -1
arch/powerpc/include/asm/hugetlb.h
··· 24 24 unsigned long addr, 25 25 unsigned long len) 26 26 { 27 - if (IS_ENABLED(CONFIG_PPC_MM_SLICES) && !radix_enabled()) 27 + if (IS_ENABLED(CONFIG_PPC_64S_HASH_MMU) && !radix_enabled()) 28 28 return slice_is_hugepage_only_range(mm, addr, len); 29 29 return 0; 30 30 }
-7
arch/powerpc/include/asm/paca.h
··· 152 152 struct tlb_core_data tcd; 153 153 #endif /* CONFIG_PPC_BOOK3E */ 154 154 155 - #ifdef CONFIG_PPC_BOOK3S 156 155 #ifdef CONFIG_PPC_64S_HASH_MMU 157 - #ifdef CONFIG_PPC_MM_SLICES 158 156 unsigned char mm_ctx_low_slices_psize[BITS_PER_LONG / BITS_PER_BYTE]; 159 157 unsigned char mm_ctx_high_slices_psize[SLICE_ARRAY_SIZE]; 160 - #else 161 - u16 mm_ctx_user_psize; 162 - u16 mm_ctx_sllp; 163 - #endif 164 - #endif 165 158 #endif 166 159 167 160 /*
-5
arch/powerpc/kernel/paca.c
··· 344 344 { 345 345 mm_context_t *context = &mm->context; 346 346 347 - #ifdef CONFIG_PPC_MM_SLICES 348 347 VM_BUG_ON(!mm_ctx_slb_addr_limit(context)); 349 348 memcpy(&get_paca()->mm_ctx_low_slices_psize, mm_ctx_low_slices(context), 350 349 LOW_SLICE_ARRAY_SZ); 351 350 memcpy(&get_paca()->mm_ctx_high_slices_psize, mm_ctx_high_slices(context), 352 351 TASK_SLICE_ARRAY_SZ(context)); 353 - #else /* CONFIG_PPC_MM_SLICES */ 354 - get_paca()->mm_ctx_user_psize = context->user_psize; 355 - get_paca()->mm_ctx_sllp = context->sllp; 356 - #endif 357 352 } 358 353 #endif /* CONFIG_PPC_64S_HASH_MMU */
+1 -2
arch/powerpc/mm/book3s64/Makefile
··· 5 5 obj-y += mmu_context.o pgtable.o trace.o 6 6 ifdef CONFIG_PPC_64S_HASH_MMU 7 7 CFLAGS_REMOVE_slb.o = $(CC_FLAGS_FTRACE) 8 - obj-y += hash_pgtable.o hash_utils.o hash_tlb.o slb.o 8 + obj-y += hash_pgtable.o hash_utils.o hash_tlb.o slb.o slice.o 9 9 obj-$(CONFIG_PPC_HASH_MMU_NATIVE) += hash_native.o 10 10 obj-$(CONFIG_PPC_4K_PAGES) += hash_4k.o 11 11 obj-$(CONFIG_PPC_64K_PAGES) += hash_64k.o ··· 21 21 endif 22 22 obj-$(CONFIG_SPAPR_TCE_IOMMU) += iommu_api.o 23 23 obj-$(CONFIG_PPC_PKEY) += pkeys.o 24 - obj-$(CONFIG_PPC_MM_SLICES) += slice.o 25 24 26 25 # Instrumenting the SLB fault path can lead to duplicate SLB entries 27 26 KCOV_INSTRUMENT_slb.o := n
-14
arch/powerpc/mm/book3s64/hash_utils.c
··· 1264 1264 return pp; 1265 1265 } 1266 1266 1267 - #ifdef CONFIG_PPC_MM_SLICES 1268 1267 static unsigned int get_paca_psize(unsigned long addr) 1269 1268 { 1270 1269 unsigned char *psizes; ··· 1280 1281 return (psizes[index >> 1] >> (mask_index * 4)) & 0xF; 1281 1282 } 1282 1283 1283 - #else 1284 - unsigned int get_paca_psize(unsigned long addr) 1285 - { 1286 - return get_paca()->mm_ctx_user_psize; 1287 - } 1288 - #endif 1289 1284 1290 1285 /* 1291 1286 * Demote a segment to using 4k pages. ··· 1673 1680 } 1674 1681 } 1675 1682 1676 - #ifdef CONFIG_PPC_MM_SLICES 1677 1683 static bool should_hash_preload(struct mm_struct *mm, unsigned long ea) 1678 1684 { 1679 1685 int psize = get_slice_psize(mm, ea); ··· 1689 1697 1690 1698 return true; 1691 1699 } 1692 - #else 1693 - static bool should_hash_preload(struct mm_struct *mm, unsigned long ea) 1694 - { 1695 - return true; 1696 - } 1697 - #endif 1698 1700 1699 1701 static void hash_preload(struct mm_struct *mm, pte_t *ptep, unsigned long ea, 1700 1702 bool is_exec, unsigned long trap)
+1 -1
arch/powerpc/mm/hugetlbpage.c
··· 558 558 return radix__hugetlb_get_unmapped_area(file, addr, len, 559 559 pgoff, flags); 560 560 #endif 561 - #ifdef CONFIG_PPC_MM_SLICES 561 + #ifdef CONFIG_PPC_64S_HASH_MMU 562 562 return slice_get_unmapped_area(addr, len, flags, file_to_psize(file), 1); 563 563 #endif 564 564 BUG();
+2 -2
arch/powerpc/mm/mmap.c
··· 190 190 unsigned long pgoff, 191 191 unsigned long flags) 192 192 { 193 - #ifdef CONFIG_PPC_MM_SLICES 193 + #ifdef CONFIG_PPC_64S_HASH_MMU 194 194 return slice_get_unmapped_area(addr, len, flags, 195 195 mm_ctx_user_psize(&current->mm->context), 0); 196 196 #else ··· 204 204 const unsigned long pgoff, 205 205 const unsigned long flags) 206 206 { 207 - #ifdef CONFIG_PPC_MM_SLICES 207 + #ifdef CONFIG_PPC_64S_HASH_MMU 208 208 return slice_get_unmapped_area(addr0, len, flags, 209 209 mm_ctx_user_psize(&current->mm->context), 1); 210 210 #else
-4
arch/powerpc/platforms/Kconfig.cputype
··· 377 377 config PPC_64S_HASH_MMU 378 378 bool "Hash MMU Support" 379 379 depends on PPC_BOOK3S_64 380 - select PPC_MM_SLICES 381 380 default y 382 381 help 383 382 Enable support for the Power ISA Hash style MMU. This is implemented ··· 449 450 config PPC_BOOK3E_MMU 450 451 def_bool y 451 452 depends on FSL_BOOKE || PPC_BOOK3E 452 - 453 - config PPC_MM_SLICES 454 - bool 455 453 456 454 config PPC_HAVE_PMU_SUPPORT 457 455 bool