1 #ifndef __ASM_SH_PGALLOC_PMD_H
2 #define __ASM_SH_PGALLOC_PMD_H
4 static inline pgd_t *pgd_alloc(struct mm_struct *mm)
9 pgd = kzalloc(sizeof(*pgd) * PTRS_PER_PGD, GFP_KERNEL | __GFP_REPEAT);
11 for (i = USER_PTRS_PER_PGD; i < PTRS_PER_PGD; i++)
12 pgd[i] = swapper_pg_dir[i];
17 static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd)
22 static inline void __check_pgt_cache(void)
26 static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
28 set_pud(pud, __pud((unsigned long)pmd));
31 static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
33 return quicklist_alloc(QUICK_PT, GFP_KERNEL | __GFP_REPEAT, NULL);
36 static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
38 quicklist_free(QUICK_PT, NULL, pmd);
41 #endif /* __ASM_SH_PGALLOC_PMD_H */