treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / powerpc / include / asm / slice.h
blobc6f466f4c24100b82502d8f6934d999b0053d783
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 #elif defined(CONFIG_PPC_MMU_NOHASH_32)
8 #include <asm/nohash/32/slice.h>
9 #endif
11 #ifndef __ASSEMBLY__
13 struct mm_struct;
15 #ifdef CONFIG_PPC_MM_SLICES
17 #ifdef CONFIG_HUGETLB_PAGE
18 #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
19 #endif
20 #define HAVE_ARCH_UNMAPPED_AREA
21 #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
23 unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len,
24 unsigned long flags, unsigned int psize,
25 int topdown);
27 unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr);
29 void slice_set_range_psize(struct mm_struct *mm, unsigned long start,
30 unsigned long len, unsigned int psize);
32 void slice_init_new_context_exec(struct mm_struct *mm);
33 void slice_setup_new_exec(void);
35 #else /* CONFIG_PPC_MM_SLICES */
37 static inline void slice_init_new_context_exec(struct mm_struct *mm) {}
39 static inline unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr)
41 return 0;
44 #endif /* CONFIG_PPC_MM_SLICES */
46 #endif /* __ASSEMBLY__ */
48 #endif /* _ASM_POWERPC_SLICE_H */