hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_POWERPC_SLICE_H
#define _ASM_POWERPC_SLICE_H
 
#ifdef CONFIG_PPC_BOOK3S_64
#include <asm/book3s/64/slice.h>
#endif
 
#ifndef __ASSEMBLY__
 
struct mm_struct;
 
#ifdef CONFIG_PPC_MM_SLICES
 
#ifdef CONFIG_HUGETLB_PAGE
#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
#endif
#define HAVE_ARCH_UNMAPPED_AREA
#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
 
unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len,
                     unsigned long flags, unsigned int psize,
                     int topdown);
 
unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr);
 
void slice_set_range_psize(struct mm_struct *mm, unsigned long start,
              unsigned long len, unsigned int psize);
 
void slice_init_new_context_exec(struct mm_struct *mm);
void slice_setup_new_exec(void);
 
#else /* CONFIG_PPC_MM_SLICES */
 
static inline void slice_init_new_context_exec(struct mm_struct *mm) {}
 
static inline unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr)
{
   return 0;
}
 
#endif /* CONFIG_PPC_MM_SLICES */
 
#endif /* __ASSEMBLY__ */
 
#endif /* _ASM_POWERPC_SLICE_H */