diff options
Diffstat (limited to 'include/asm-um/pgalloc.h')
-rw-r--r-- | include/asm-um/pgalloc.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/asm-um/pgalloc.h b/include/asm-um/pgalloc.h index 4f3e62b02861..9062a6e72241 100644 --- a/include/asm-um/pgalloc.h +++ b/include/asm-um/pgalloc.h | |||
@@ -18,6 +18,7 @@ | |||
18 | set_pmd(pmd, __pmd(_PAGE_TABLE + \ | 18 | set_pmd(pmd, __pmd(_PAGE_TABLE + \ |
19 | ((unsigned long long)page_to_pfn(pte) << \ | 19 | ((unsigned long long)page_to_pfn(pte) << \ |
20 | (unsigned long long) PAGE_SHIFT))) | 20 | (unsigned long long) PAGE_SHIFT))) |
21 | #define pmd_pgtable(pmd) pmd_page(pmd) | ||
21 | 22 | ||
22 | /* | 23 | /* |
23 | * Allocate and free page tables. | 24 | * Allocate and free page tables. |
@@ -26,19 +27,24 @@ extern pgd_t *pgd_alloc(struct mm_struct *); | |||
26 | extern void pgd_free(struct mm_struct *mm, pgd_t *pgd); | 27 | extern void pgd_free(struct mm_struct *mm, pgd_t *pgd); |
27 | 28 | ||
28 | extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long); | 29 | extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long); |
29 | extern struct page *pte_alloc_one(struct mm_struct *, unsigned long); | 30 | extern pgtable_t pte_alloc_one(struct mm_struct *, unsigned long); |
30 | 31 | ||
31 | static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) | 32 | static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) |
32 | { | 33 | { |
33 | free_page((unsigned long) pte); | 34 | free_page((unsigned long) pte); |
34 | } | 35 | } |
35 | 36 | ||
36 | static inline void pte_free(struct mm_struct *mm, struct page *pte) | 37 | static inline void pte_free(struct mm_struct *mm, pgtable_t pte) |
37 | { | 38 | { |
39 | pgtable_page_dtor(pte); | ||
38 | __free_page(pte); | 40 | __free_page(pte); |
39 | } | 41 | } |
40 | 42 | ||
41 | #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) | 43 | #define __pte_free_tlb(tlb,pte) \ |
44 | do { \ | ||
45 | pgtable_page_dtor(pte); \ | ||
46 | tlb_remove_page((tlb),(pte)); \ | ||
47 | } while (0) | ||
42 | 48 | ||
43 | #ifdef CONFIG_3_LEVEL_PGTABLES | 49 | #ifdef CONFIG_3_LEVEL_PGTABLES |
44 | 50 | ||