diff options
Diffstat (limited to 'arch/powerpc/include/asm/pgalloc.h')
-rw-r--r-- | arch/powerpc/include/asm/pgalloc.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/pgalloc.h b/arch/powerpc/include/asm/pgalloc.h index e11f03007b57..c2c6fd438840 100644 --- a/arch/powerpc/include/asm/pgalloc.h +++ b/arch/powerpc/include/asm/pgalloc.h | |||
@@ -20,6 +20,31 @@ static inline gfp_t pgtable_gfp_flags(struct mm_struct *mm, gfp_t gfp) | |||
20 | 20 | ||
21 | #define PGALLOC_GFP (GFP_KERNEL | __GFP_ZERO) | 21 | #define PGALLOC_GFP (GFP_KERNEL | __GFP_ZERO) |
22 | 22 | ||
23 | pte_t *pte_fragment_alloc(struct mm_struct *mm, int kernel); | ||
24 | |||
25 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm) | ||
26 | { | ||
27 | return (pte_t *)pte_fragment_alloc(mm, 1); | ||
28 | } | ||
29 | |||
30 | static inline pgtable_t pte_alloc_one(struct mm_struct *mm) | ||
31 | { | ||
32 | return (pgtable_t)pte_fragment_alloc(mm, 0); | ||
33 | } | ||
34 | |||
35 | void pte_frag_destroy(void *pte_frag); | ||
36 | void pte_fragment_free(unsigned long *table, int kernel); | ||
37 | |||
38 | static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) | ||
39 | { | ||
40 | pte_fragment_free((unsigned long *)pte, 1); | ||
41 | } | ||
42 | |||
43 | static inline void pte_free(struct mm_struct *mm, pgtable_t ptepage) | ||
44 | { | ||
45 | pte_fragment_free((unsigned long *)ptepage, 0); | ||
46 | } | ||
47 | |||
23 | #ifdef CONFIG_PPC_BOOK3S | 48 | #ifdef CONFIG_PPC_BOOK3S |
24 | #include <asm/book3s/pgalloc.h> | 49 | #include <asm/book3s/pgalloc.h> |
25 | #else | 50 | #else |