hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/ia64/include/asm/pgalloc.h
....@@ -19,36 +19,23 @@
1919 #include <linux/mm.h>
2020 #include <linux/page-flags.h>
2121 #include <linux/threads.h>
22
-#include <linux/quicklist.h>
22
+
23
+#include <asm-generic/pgalloc.h>
2324
2425 #include <asm/mmu_context.h>
2526
2627 static inline pgd_t *pgd_alloc(struct mm_struct *mm)
2728 {
28
- return quicklist_alloc(0, GFP_KERNEL, NULL);
29
-}
30
-
31
-static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
32
-{
33
- quicklist_free(0, NULL, pgd);
29
+ return (pgd_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
3430 }
3531
3632 #if CONFIG_PGTABLE_LEVELS == 4
3733 static inline void
38
-pgd_populate(struct mm_struct *mm, pgd_t * pgd_entry, pud_t * pud)
34
+p4d_populate(struct mm_struct *mm, p4d_t * p4d_entry, pud_t * pud)
3935 {
40
- pgd_val(*pgd_entry) = __pa(pud);
36
+ p4d_val(*p4d_entry) = __pa(pud);
4137 }
4238
43
-static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
44
-{
45
- return quicklist_alloc(0, GFP_KERNEL, NULL);
46
-}
47
-
48
-static inline void pud_free(struct mm_struct *mm, pud_t *pud)
49
-{
50
- quicklist_free(0, NULL, pud);
51
-}
5239 #define __pud_free_tlb(tlb, pud, address) pud_free((tlb)->mm, pud)
5340 #endif /* CONFIG_PGTABLE_LEVELS == 4 */
5441
....@@ -56,16 +43,6 @@
5643 pud_populate(struct mm_struct *mm, pud_t * pud_entry, pmd_t * pmd)
5744 {
5845 pud_val(*pud_entry) = __pa(pmd);
59
-}
60
-
61
-static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr)
62
-{
63
- return quicklist_alloc(0, GFP_KERNEL, NULL);
64
-}
65
-
66
-static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
67
-{
68
- quicklist_free(0, NULL, pmd);
6946 }
7047
7148 #define __pmd_free_tlb(tlb, pmd, address) pmd_free((tlb)->mm, pmd)
....@@ -81,44 +58,6 @@
8158 pmd_populate_kernel(struct mm_struct *mm, pmd_t * pmd_entry, pte_t * pte)
8259 {
8360 pmd_val(*pmd_entry) = __pa(pte);
84
-}
85
-
86
-static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addr)
87
-{
88
- struct page *page;
89
- void *pg;
90
-
91
- pg = quicklist_alloc(0, GFP_KERNEL, NULL);
92
- if (!pg)
93
- return NULL;
94
- page = virt_to_page(pg);
95
- if (!pgtable_page_ctor(page)) {
96
- quicklist_free(0, NULL, pg);
97
- return NULL;
98
- }
99
- return page;
100
-}
101
-
102
-static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
103
- unsigned long addr)
104
-{
105
- return quicklist_alloc(0, GFP_KERNEL, NULL);
106
-}
107
-
108
-static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
109
-{
110
- pgtable_page_dtor(pte);
111
- quicklist_free_page(0, NULL, pte);
112
-}
113
-
114
-static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
115
-{
116
- quicklist_free(0, NULL, pte);
117
-}
118
-
119
-static inline void check_pgt_cache(void)
120
-{
121
- quicklist_trim(0, NULL, 25, 16);
12261 }
12362
12463 #define __pte_free_tlb(tlb, pte, address) pte_free((tlb)->mm, pte)