Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * arch/arm64/include/asm/hugetlb.h
0004  *
0005  * Copyright (C) 2013 Linaro Ltd.
0006  *
0007  * Based on arch/x86/include/asm/hugetlb.h
0008  */
0009 
0010 #ifndef __ASM_HUGETLB_H
0011 #define __ASM_HUGETLB_H
0012 
0013 #include <asm/page.h>
0014 
0015 #ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
0016 #define arch_hugetlb_migration_supported arch_hugetlb_migration_supported
0017 extern bool arch_hugetlb_migration_supported(struct hstate *h);
0018 #endif
0019 
0020 static inline void arch_clear_hugepage_flags(struct page *page)
0021 {
0022     clear_bit(PG_dcache_clean, &page->flags);
0023 }
0024 #define arch_clear_hugepage_flags arch_clear_hugepage_flags
0025 
0026 pte_t arch_make_huge_pte(pte_t entry, unsigned int shift, vm_flags_t flags);
0027 #define arch_make_huge_pte arch_make_huge_pte
0028 #define __HAVE_ARCH_HUGE_SET_HUGE_PTE_AT
0029 extern void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
0030                 pte_t *ptep, pte_t pte);
0031 #define __HAVE_ARCH_HUGE_PTEP_SET_ACCESS_FLAGS
0032 extern int huge_ptep_set_access_flags(struct vm_area_struct *vma,
0033                       unsigned long addr, pte_t *ptep,
0034                       pte_t pte, int dirty);
0035 #define __HAVE_ARCH_HUGE_PTEP_GET_AND_CLEAR
0036 extern pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
0037                      unsigned long addr, pte_t *ptep);
0038 #define __HAVE_ARCH_HUGE_PTEP_SET_WRPROTECT
0039 extern void huge_ptep_set_wrprotect(struct mm_struct *mm,
0040                     unsigned long addr, pte_t *ptep);
0041 #define __HAVE_ARCH_HUGE_PTEP_CLEAR_FLUSH
0042 extern pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,
0043                    unsigned long addr, pte_t *ptep);
0044 #define __HAVE_ARCH_HUGE_PTE_CLEAR
0045 extern void huge_pte_clear(struct mm_struct *mm, unsigned long addr,
0046                pte_t *ptep, unsigned long sz);
0047 #define __HAVE_ARCH_HUGE_PTEP_GET
0048 extern pte_t huge_ptep_get(pte_t *ptep);
0049 
0050 void __init arm64_hugetlb_cma_reserve(void);
0051 
0052 #include <asm-generic/hugetlb.h>
0053 
0054 #endif /* __ASM_HUGETLB_H */