diff options
Diffstat (limited to 'include/asm-avr32/pgalloc.h')
-rw-r--r-- | include/asm-avr32/pgalloc.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/include/asm-avr32/pgalloc.h b/include/asm-avr32/pgalloc.h index b77e364b4c44..51fc1f6e4b17 100644 --- a/include/asm-avr32/pgalloc.h +++ b/include/asm-avr32/pgalloc.h | |||
@@ -17,10 +17,11 @@ | |||
17 | set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte))) | 17 | set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte))) |
18 | 18 | ||
19 | static __inline__ void pmd_populate(struct mm_struct *mm, pmd_t *pmd, | 19 | static __inline__ void pmd_populate(struct mm_struct *mm, pmd_t *pmd, |
20 | struct page *pte) | 20 | pgtable_t pte) |
21 | { | 21 | { |
22 | set_pmd(pmd, __pmd(_PAGE_TABLE + page_to_phys(pte))); | 22 | set_pmd(pmd, __pmd(_PAGE_TABLE + page_to_phys(pte))); |
23 | } | 23 | } |
24 | #define pmd_pgtable(pmd) pmd_page(pmd) | ||
24 | 25 | ||
25 | /* | 26 | /* |
26 | * Allocate and free page tables | 27 | * Allocate and free page tables |
@@ -51,7 +52,9 @@ static inline struct page *pte_alloc_one(struct mm_struct *mm, | |||
51 | struct page *pte; | 52 | struct page *pte; |
52 | 53 | ||
53 | pte = alloc_page(GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO); | 54 | pte = alloc_page(GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO); |
54 | 55 | if (!pte) | |
56 | return NULL; | ||
57 | pgtable_page_ctor(pte); | ||
55 | return pte; | 58 | return pte; |
56 | } | 59 | } |
57 | 60 | ||
@@ -60,12 +63,17 @@ static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) | |||
60 | free_page((unsigned long)pte); | 63 | free_page((unsigned long)pte); |
61 | } | 64 | } |
62 | 65 | ||
63 | static inline void pte_free(struct mm_struct *mm, struct page *pte) | 66 | static inline void pte_free(struct mm_struct *mm, pgtable_t pte) |
64 | { | 67 | { |
68 | pgtable_page_dtor(pte); | ||
65 | __free_page(pte); | 69 | __free_page(pte); |
66 | } | 70 | } |
67 | 71 | ||
68 | #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) | 72 | #define __pte_free_tlb(tlb,pte) \ |
73 | do { \ | ||
74 | pgtable_page_dtor(pte); \ | ||
75 | tlb_remove_page((tlb), pte); \ | ||
76 | } while (0) | ||
69 | 77 | ||
70 | #define check_pgt_cache() do { } while(0) | 78 | #define check_pgt_cache() do { } while(0) |
71 | 79 | ||