2018-02-22 22:27:22 +08:00
|
|
|
/* 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>
|
2019-04-25 22:29:28 +08:00
|
|
|
#elif defined(CONFIG_PPC_MMU_NOHASH_32)
|
2018-02-22 22:27:24 +08:00
|
|
|
#include <asm/nohash/32/slice.h>
|
2018-02-22 22:27:22 +08:00
|
|
|
#endif
|
|
|
|
|
2018-12-10 20:23:05 +08:00
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
|
|
|
struct mm_struct;
|
|
|
|
|
2018-02-22 22:27:22 +08:00
|
|
|
#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);
|
|
|
|
|
2018-03-07 09:37:09 +08:00
|
|
|
void slice_init_new_context_exec(struct mm_struct *mm);
|
2018-09-14 23:30:55 +08:00
|
|
|
void slice_setup_new_exec(void);
|
2018-03-07 09:37:09 +08:00
|
|
|
|
2018-12-10 20:23:05 +08:00
|
|
|
#else /* CONFIG_PPC_MM_SLICES */
|
|
|
|
|
|
|
|
static inline void slice_init_new_context_exec(struct mm_struct *mm) {}
|
2018-02-22 22:27:22 +08:00
|
|
|
|
2019-04-25 22:29:35 +08:00
|
|
|
static inline unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-02-22 22:27:22 +08:00
|
|
|
#endif /* CONFIG_PPC_MM_SLICES */
|
|
|
|
|
2018-12-10 20:23:05 +08:00
|
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
|
2018-02-22 22:27:22 +08:00
|
|
|
#endif /* _ASM_POWERPC_SLICE_H */
|