powerpc/mm: Fixup tlbie vs mtpidr/mtlpidr ordering issue on POWER9
[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>
02f89aed 7#elif defined(CONFIG_PPC_MMU_NOHASH_32)
db3a528d 8#include <asm/nohash/32/slice.h>
a3286f05
CL
9#endif
10
badb9687
CL
11#ifndef __ASSEMBLY__
12
13struct mm_struct;
14
a3286f05
CL
15#ifdef CONFIG_PPC_MM_SLICES
16
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
22
a3286f05
CL
23unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len,
24 unsigned long flags, unsigned int psize,
25 int topdown);
26
27unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr);
28
a3286f05
CL
29void slice_set_range_psize(struct mm_struct *mm, unsigned long start,
30 unsigned long len, unsigned int psize);
a3286f05 31
1753dd18 32void slice_init_new_context_exec(struct mm_struct *mm);
425d3314 33void slice_setup_new_exec(void);
1753dd18 34
badb9687
CL
35#else /* CONFIG_PPC_MM_SLICES */
36
37static inline void slice_init_new_context_exec(struct mm_struct *mm) {}
a3286f05 38
43ed7909
CL
39static inline unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr)
40{
41 return 0;
42}
43
a3286f05
CL
44#endif /* CONFIG_PPC_MM_SLICES */
45
badb9687
CL
46#endif /* __ASSEMBLY__ */
47
a3286f05 48#endif /* _ASM_POWERPC_SLICE_H */