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: Make slice specific to book3s/64

Since commit 555904d07eef ("powerpc/8xx: MM_SLICE is not needed
anymore") only book3s/64 selects CONFIG_PPC_MM_SLICES.

Move slice.c into mm/book3s64/

Move necessary stuff in asm/book3s/64/slice.h and
remove asm/slice.h

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

authored by

Christophe Leroy and committed by
Michael Ellerman
1408fca0 93ea9102

+20 -63
+1
arch/powerpc/include/asm/book3s/64/mmu-hash.h
··· 18 18 * complete pgtable.h but only a portion of it. 19 19 */ 20 20 #include <asm/book3s/64/pgtable.h> 21 + #include <asm/book3s/64/slice.h> 21 22 #include <asm/task_size_64.h> 22 23 #include <asm/cpu_has_feature.h> 23 24
+18
arch/powerpc/include/asm/book3s/64/slice.h
··· 2 2 #ifndef _ASM_POWERPC_BOOK3S_64_SLICE_H 3 3 #define _ASM_POWERPC_BOOK3S_64_SLICE_H 4 4 5 + #ifndef __ASSEMBLY__ 6 + 5 7 #define SLICE_LOW_SHIFT 28 6 8 #define SLICE_LOW_TOP (0x100000000ul) 7 9 #define SLICE_NUM_LOW (SLICE_LOW_TOP >> SLICE_LOW_SHIFT) ··· 14 12 #define GET_HIGH_SLICE_INDEX(addr) ((addr) >> SLICE_HIGH_SHIFT) 15 13 16 14 #define SLB_ADDR_LIMIT_DEFAULT DEFAULT_MAP_WINDOW_USER64 15 + 16 + struct mm_struct; 17 + 18 + unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len, 19 + unsigned long flags, unsigned int psize, 20 + int topdown); 21 + 22 + unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr); 23 + 24 + void slice_set_range_psize(struct mm_struct *mm, unsigned long start, 25 + unsigned long len, unsigned int psize); 26 + 27 + void slice_init_new_context_exec(struct mm_struct *mm); 28 + void slice_setup_new_exec(void); 29 + 30 + #endif /* __ASSEMBLY__ */ 17 31 18 32 #endif /* _ASM_POWERPC_BOOK3S_64_SLICE_H */
-1
arch/powerpc/include/asm/page.h
··· 333 333 334 334 #include <asm-generic/memory_model.h> 335 335 #endif /* __ASSEMBLY__ */ 336 - #include <asm/slice.h> 337 336 338 337 #endif /* _ASM_POWERPC_PAGE_H */
-46
arch/powerpc/include/asm/slice.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _ASM_POWERPC_SLICE_H 3 - #define _ASM_POWERPC_SLICE_H 4 - 5 - #ifdef CONFIG_PPC_BOOK3S_64 6 - #include <asm/book3s/64/slice.h> 7 - #endif 8 - 9 - #ifndef __ASSEMBLY__ 10 - 11 - struct mm_struct; 12 - 13 - #ifdef CONFIG_PPC_MM_SLICES 14 - 15 - #ifdef CONFIG_HUGETLB_PAGE 16 - #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA 17 - #endif 18 - #define HAVE_ARCH_UNMAPPED_AREA 19 - #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN 20 - 21 - unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len, 22 - unsigned long flags, unsigned int psize, 23 - int topdown); 24 - 25 - unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr); 26 - 27 - void slice_set_range_psize(struct mm_struct *mm, unsigned long start, 28 - unsigned long len, unsigned int psize); 29 - 30 - void slice_init_new_context_exec(struct mm_struct *mm); 31 - void slice_setup_new_exec(void); 32 - 33 - #else /* CONFIG_PPC_MM_SLICES */ 34 - 35 - static inline void slice_init_new_context_exec(struct mm_struct *mm) {} 36 - 37 - static inline unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr) 38 - { 39 - return 0; 40 - } 41 - 42 - #endif /* CONFIG_PPC_MM_SLICES */ 43 - 44 - #endif /* __ASSEMBLY__ */ 45 - 46 - #endif /* _ASM_POWERPC_SLICE_H */
-1
arch/powerpc/mm/Makefile
··· 14 14 obj-$(CONFIG_PPC_BOOK3S_32) += book3s32/ 15 15 obj-$(CONFIG_PPC_BOOK3S_64) += book3s64/ 16 16 obj-$(CONFIG_NUMA) += numa.o 17 - obj-$(CONFIG_PPC_MM_SLICES) += slice.o 18 17 obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o 19 18 obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o 20 19 obj-$(CONFIG_PPC_COPRO_BASE) += copro_fault.o
+1
arch/powerpc/mm/book3s64/Makefile
··· 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 24 25 25 26 # Instrumenting the SLB fault path can lead to duplicate SLB entries 26 27 KCOV_INSTRUMENT_slb.o := n
-9
arch/powerpc/mm/nohash/mmu_context.c
··· 317 317 */ 318 318 int init_new_context(struct task_struct *t, struct mm_struct *mm) 319 319 { 320 - /* 321 - * We have MMU_NO_CONTEXT set to be ~0. Hence check 322 - * explicitly against context.id == 0. This ensures that we properly 323 - * initialize context slice details for newly allocated mm's (which will 324 - * have id == 0) and don't alter context slice inherited via fork (which 325 - * will have id != 0). 326 - */ 327 - if (mm->context.id == 0) 328 - slice_init_new_context_exec(mm); 329 320 mm->context.id = MMU_NO_CONTEXT; 330 321 mm->context.active = 0; 331 322 pte_frag_set(&mm->context, NULL);
-4
arch/powerpc/mm/nohash/tlb.c
··· 773 773 #ifdef CONFIG_PPC_47x 774 774 early_init_mmu_47x(); 775 775 #endif 776 - 777 - #ifdef CONFIG_PPC_MM_SLICES 778 - mm_ctx_set_slb_addr_limit(&init_mm.context, SLB_ADDR_LIMIT_DEFAULT); 779 - #endif 780 776 } 781 777 #endif /* CONFIG_PPC64 */
-2
arch/powerpc/mm/slice.c arch/powerpc/mm/book3s64/slice.c
··· 692 692 bitmap_fill(mask->high_slices, SLICE_NUM_HIGH); 693 693 } 694 694 695 - #ifdef CONFIG_PPC_BOOK3S_64 696 695 void slice_setup_new_exec(void) 697 696 { 698 697 struct mm_struct *mm = current->mm; ··· 703 704 704 705 mm_ctx_set_slb_addr_limit(&mm->context, DEFAULT_MAP_WINDOW); 705 706 } 706 - #endif 707 707 708 708 void slice_set_range_psize(struct mm_struct *mm, unsigned long start, 709 709 unsigned long len, unsigned int psize)