hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/mips/include/asm/hugetlb.h
....@@ -10,16 +10,8 @@
1010 #define __ASM_HUGETLB_H
1111
1212 #include <asm/page.h>
13
-#include <asm-generic/hugetlb.h>
1413
15
-
16
-static inline int is_hugepage_only_range(struct mm_struct *mm,
17
- unsigned long addr,
18
- unsigned long len)
19
-{
20
- return 0;
21
-}
22
-
14
+#define __HAVE_ARCH_PREPARE_HUGEPAGE_RANGE
2315 static inline int prepare_hugepage_range(struct file *file,
2416 unsigned long addr,
2517 unsigned long len)
....@@ -38,21 +30,7 @@
3830 return 0;
3931 }
4032
41
-static inline void hugetlb_free_pgd_range(struct mmu_gather *tlb,
42
- unsigned long addr,
43
- unsigned long end,
44
- unsigned long floor,
45
- unsigned long ceiling)
46
-{
47
- free_pgd_range(tlb, addr, end, floor, ceiling);
48
-}
49
-
50
-static inline void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
51
- pte_t *ptep, pte_t pte)
52
-{
53
- set_pte_at(mm, addr, ptep, pte);
54
-}
55
-
33
+#define __HAVE_ARCH_HUGE_PTEP_GET_AND_CLEAR
5634 static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
5735 unsigned long addr, pte_t *ptep)
5836 {
....@@ -64,6 +42,7 @@
6442 return pte;
6543 }
6644
45
+#define __HAVE_ARCH_HUGE_PTEP_CLEAR_FLUSH
6746 static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
6847 unsigned long addr, pte_t *ptep)
6948 {
....@@ -76,23 +55,14 @@
7655 flush_tlb_page(vma, addr);
7756 }
7857
58
+#define __HAVE_ARCH_HUGE_PTE_NONE
7959 static inline int huge_pte_none(pte_t pte)
8060 {
8161 unsigned long val = pte_val(pte) & ~_PAGE_GLOBAL;
8262 return !val || (val == (unsigned long)invalid_pte_table);
8363 }
8464
85
-static inline pte_t huge_pte_wrprotect(pte_t pte)
86
-{
87
- return pte_wrprotect(pte);
88
-}
89
-
90
-static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
91
- unsigned long addr, pte_t *ptep)
92
-{
93
- ptep_set_wrprotect(mm, addr, ptep);
94
-}
95
-
65
+#define __HAVE_ARCH_HUGE_PTEP_SET_ACCESS_FLAGS
9666 static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma,
9767 unsigned long addr,
9868 pte_t *ptep, pte_t pte,
....@@ -111,13 +81,6 @@
11181 return changed;
11282 }
11383
114
-static inline pte_t huge_ptep_get(pte_t *ptep)
115
-{
116
- return *ptep;
117
-}
118
-
119
-static inline void arch_clear_hugepage_flags(struct page *page)
120
-{
121
-}
84
+#include <asm-generic/hugetlb.h>
12285
12386 #endif /* __ASM_HUGETLB_H */