hugetlb: introduce generic version of hugetlb_free_pgd_range
[linux/fpc-iii.git] / arch / parisc / include / asm / hugetlb.h
blob28c23b68d38d7a2a48c4a068803941c0fd3dd5c4
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_PARISC64_HUGETLB_H
3 #define _ASM_PARISC64_HUGETLB_H
5 #include <asm/page.h>
7 void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
8 pte_t *ptep, pte_t pte);
10 pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
11 pte_t *ptep);
13 static inline int is_hugepage_only_range(struct mm_struct *mm,
14 unsigned long addr,
15 unsigned long len) {
16 return 0;
20 * If the arch doesn't supply something else, assume that hugepage
21 * size aligned regions are ok without further preparation.
23 static inline int prepare_hugepage_range(struct file *file,
24 unsigned long addr, unsigned long len)
26 if (len & ~HPAGE_MASK)
27 return -EINVAL;
28 if (addr & ~HPAGE_MASK)
29 return -EINVAL;
30 return 0;
33 static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
34 unsigned long addr, pte_t *ptep)
38 static inline int huge_pte_none(pte_t pte)
40 return pte_none(pte);
43 static inline pte_t huge_pte_wrprotect(pte_t pte)
45 return pte_wrprotect(pte);
48 void huge_ptep_set_wrprotect(struct mm_struct *mm,
49 unsigned long addr, pte_t *ptep);
51 int huge_ptep_set_access_flags(struct vm_area_struct *vma,
52 unsigned long addr, pte_t *ptep,
53 pte_t pte, int dirty);
55 static inline pte_t huge_ptep_get(pte_t *ptep)
57 return *ptep;
60 static inline void arch_clear_hugepage_flags(struct page *page)
64 #include <asm-generic/hugetlb.h>
66 #endif /* _ASM_PARISC64_HUGETLB_H */