+2
-32
arch/hexagon/include/asm/pgalloc.h
+2
-32
arch/hexagon/include/asm/pgalloc.h
···
11
11
#include <asm/mem-layout.h>
12
12
#include <asm/atomic.h>
13
13
14
+
#include <asm-generic/pgalloc.h> /* for pte_{alloc,free}_one */
15
+
14
16
#define check_pgt_cache() do {} while (0)
15
17
16
18
extern unsigned long long kmap_generation;
···
46
44
static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
47
45
{
48
46
free_page((unsigned long) pgd);
49
-
}
50
-
51
-
static inline struct page *pte_alloc_one(struct mm_struct *mm)
52
-
{
53
-
struct page *pte;
54
-
55
-
pte = alloc_page(GFP_KERNEL | __GFP_ZERO);
56
-
if (!pte)
57
-
return NULL;
58
-
if (!pgtable_page_ctor(pte)) {
59
-
__free_page(pte);
60
-
return NULL;
61
-
}
62
-
return pte;
63
-
}
64
-
65
-
/* _kernel variant gets to use a different allocator */
66
-
static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm)
67
-
{
68
-
gfp_t flags = GFP_KERNEL | __GFP_ZERO;
69
-
return (pte_t *) __get_free_page(flags);
70
-
}
71
-
72
-
static inline void pte_free(struct mm_struct *mm, struct page *pte)
73
-
{
74
-
pgtable_page_dtor(pte);
75
-
__free_page(pte);
76
-
}
77
-
78
-
static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte)
79
-
{
80
-
free_page((unsigned long)pte);
81
47
}
82
48
83
49
static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,