18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef _ASM_POWERPC_SLICE_H 38c2ecf20Sopenharmony_ci#define _ASM_POWERPC_SLICE_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#ifdef CONFIG_PPC_BOOK3S_64 68c2ecf20Sopenharmony_ci#include <asm/book3s/64/slice.h> 78c2ecf20Sopenharmony_ci#endif 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#ifndef __ASSEMBLY__ 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_cistruct mm_struct; 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#ifdef CONFIG_PPC_MM_SLICES 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#ifdef CONFIG_HUGETLB_PAGE 168c2ecf20Sopenharmony_ci#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA 178c2ecf20Sopenharmony_ci#endif 188c2ecf20Sopenharmony_ci#define HAVE_ARCH_UNMAPPED_AREA 198c2ecf20Sopenharmony_ci#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ciunsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len, 228c2ecf20Sopenharmony_ci unsigned long flags, unsigned int psize, 238c2ecf20Sopenharmony_ci int topdown); 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ciunsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr); 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_civoid slice_set_range_psize(struct mm_struct *mm, unsigned long start, 288c2ecf20Sopenharmony_ci unsigned long len, unsigned int psize); 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_civoid slice_init_new_context_exec(struct mm_struct *mm); 318c2ecf20Sopenharmony_civoid slice_setup_new_exec(void); 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci#else /* CONFIG_PPC_MM_SLICES */ 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_cistatic inline void slice_init_new_context_exec(struct mm_struct *mm) {} 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_cistatic inline unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr) 388c2ecf20Sopenharmony_ci{ 398c2ecf20Sopenharmony_ci return 0; 408c2ecf20Sopenharmony_ci} 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci#endif /* CONFIG_PPC_MM_SLICES */ 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci#endif /* __ASSEMBLY__ */ 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci#endif /* _ASM_POWERPC_SLICE_H */ 47