WIP FPC-III support
[linux/fpc-iii.git] / arch / powerpc / include / asm / slice.h
blob0bdd9c62eca0d07a40123b6fd072fb6154e794be
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_POWERPC_SLICE_H
3 #define _ASM_POWERPC_SLICE_H
5 #ifdef CONFIG_PPC_BOOK3S_64
6 #include <asm/book3s/64/slice.h>
7 #endif
9 #ifndef __ASSEMBLY__
11 struct mm_struct;
13 #ifdef CONFIG_PPC_MM_SLICES
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
21 unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len,
22 unsigned long flags, unsigned int psize,
23 int topdown);
25 unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr);
27 void slice_set_range_psize(struct mm_struct *mm, unsigned long start,
28 unsigned long len, unsigned int psize);
30 void slice_init_new_context_exec(struct mm_struct *mm);
31 void slice_setup_new_exec(void);
33 #else /* CONFIG_PPC_MM_SLICES */
35 static inline void slice_init_new_context_exec(struct mm_struct *mm) {}
37 static inline unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr)
39 return 0;
42 #endif /* CONFIG_PPC_MM_SLICES */
44 #endif /* __ASSEMBLY__ */
46 #endif /* _ASM_POWERPC_SLICE_H */