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 #elif defined(CONFIG_PPC64) 8 #include <asm/nohash/64/slice.h> 9 #elif defined(CONFIG_PPC_MMU_NOHASH) 10 #include <asm/nohash/32/slice.h> 11 #endif 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 #ifndef __ASSEMBLY__ 22 23 struct mm_struct; 24 25 unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len, 26 unsigned long flags, unsigned int psize, 27 int topdown); 28 29 unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr); 30 31 void slice_set_user_psize(struct mm_struct *mm, unsigned int psize); 32 void slice_set_range_psize(struct mm_struct *mm, unsigned long start, 33 unsigned long len, unsigned int psize); 34 #endif /* __ASSEMBLY__ */ 35 36 #else /* CONFIG_PPC_MM_SLICES */ 37 38 #define slice_set_range_psize(mm, start, len, psize) \ 39 slice_set_user_psize((mm), (psize)) 40 #endif /* CONFIG_PPC_MM_SLICES */ 41 42 #endif /* _ASM_POWERPC_SLICE_H */ 43