|
@@ -26,11 +26,13 @@
|
|
|
|
|
|
#define check_pgt_cache() do { } while (0)
|
|
|
|
|
|
+#define PGALLOC_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_REPEAT | __GFP_ZERO)
|
|
|
+
|
|
|
#if CONFIG_ARM64_PGTABLE_LEVELS > 2
|
|
|
|
|
|
static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr)
|
|
|
{
|
|
|
- return (pmd_t *)get_zeroed_page(GFP_KERNEL | __GFP_REPEAT);
|
|
|
+ return (pmd_t *)__get_free_page(PGALLOC_GFP);
|
|
|
}
|
|
|
|
|
|
static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
|
|
@@ -50,7 +52,7 @@ static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
|
|
|
|
|
|
static inline pud_t *pud_alloc_one(struct mm_struct *mm, unsigned long addr)
|
|
|
{
|
|
|
- return (pud_t *)get_zeroed_page(GFP_KERNEL | __GFP_REPEAT);
|
|
|
+ return (pud_t *)__get_free_page(PGALLOC_GFP);
|
|
|
}
|
|
|
|
|
|
static inline void pud_free(struct mm_struct *mm, pud_t *pud)
|
|
@@ -69,8 +71,6 @@ static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, pud_t *pud)
|
|
|
extern pgd_t *pgd_alloc(struct mm_struct *mm);
|
|
|
extern void pgd_free(struct mm_struct *mm, pgd_t *pgd);
|
|
|
|
|
|
-#define PGALLOC_GFP (GFP_KERNEL | __GFP_NOTRACK | __GFP_REPEAT | __GFP_ZERO)
|
|
|
-
|
|
|
static inline pte_t *
|
|
|
pte_alloc_one_kernel(struct mm_struct *mm, unsigned long addr)
|
|
|
{
|