Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux...
[linux-2.6-block.git] / arch / powerpc / include / asm / slice.h
CommitLineData
a3286f05
CL
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>
db3a528d 7#elif defined(CONFIG_PPC64)
a3286f05 8#include <asm/nohash/64/slice.h>
db3a528d
CL
9#elif defined(CONFIG_PPC_MMU_NOHASH)
10#include <asm/nohash/32/slice.h>
a3286f05
CL
11#endif
12
badb9687
CL
13#ifndef __ASSEMBLY__
14
15struct mm_struct;
16
a3286f05
CL
17#ifdef CONFIG_PPC_MM_SLICES
18
19#ifdef CONFIG_HUGETLB_PAGE
20#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
21#endif
22#define HAVE_ARCH_UNMAPPED_AREA
23#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
24
a3286f05
CL
25unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len,
26 unsigned long flags, unsigned int psize,
27 int topdown);
28
29unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr);
30
a3286f05
CL
31void slice_set_range_psize(struct mm_struct *mm, unsigned long start,
32 unsigned long len, unsigned int psize);
a3286f05 33
1753dd18 34void slice_init_new_context_exec(struct mm_struct *mm);
425d3314 35void slice_setup_new_exec(void);
1753dd18 36
badb9687
CL
37#else /* CONFIG_PPC_MM_SLICES */
38
39static inline void slice_init_new_context_exec(struct mm_struct *mm) {}
a3286f05 40
a3286f05
CL
41#endif /* CONFIG_PPC_MM_SLICES */
42
badb9687
CL
43#endif /* __ASSEMBLY__ */
44
a3286f05 45#endif /* _ASM_POWERPC_SLICE_H */