1 #ifndef __ASM_SH_PGALLOC_NOPMD_H
2 #define __ASM_SH_PGALLOC_NOPMD_H
4 #define QUICK_PGD 0 /* We preserve special mappings over free */
6 static inline void pgd_ctor(void *x
)
10 memcpy(pgd
+ USER_PTRS_PER_PGD
,
11 swapper_pg_dir
+ USER_PTRS_PER_PGD
,
12 (PTRS_PER_PGD
- USER_PTRS_PER_PGD
) * sizeof(pgd_t
));
15 static inline pgd_t
*pgd_alloc(struct mm_struct
*mm
)
17 return quicklist_alloc(QUICK_PGD
, GFP_KERNEL
| __GFP_REPEAT
, pgd_ctor
);
20 static inline void pgd_free(struct mm_struct
*mm
, pgd_t
*pgd
)
22 quicklist_free(QUICK_PGD
, NULL
, pgd
);
25 static inline void __check_pgt_cache(void)
27 quicklist_trim(QUICK_PGD
, NULL
, 25, 16);
30 #endif /* __ASM_SH_PGALLOC_NOPMD_H */