diff options
Diffstat (limited to 'include/asm-m32r')
-rw-r--r-- | include/asm-m32r/page.h | 1 | ||||
-rw-r--r-- | include/asm-m32r/pgalloc.h | 10 |
2 files changed, 7 insertions, 4 deletions
diff --git a/include/asm-m32r/page.h b/include/asm-m32r/page.h index 05d43bbbf940..8a677f3fca68 100644 --- a/include/asm-m32r/page.h +++ b/include/asm-m32r/page.h | |||
@@ -28,6 +28,7 @@ typedef struct { unsigned long pgd; } pgd_t; | |||
28 | #define PTE_MASK PAGE_MASK | 28 | #define PTE_MASK PAGE_MASK |
29 | 29 | ||
30 | typedef struct { unsigned long pgprot; } pgprot_t; | 30 | typedef struct { unsigned long pgprot; } pgprot_t; |
31 | typedef struct page *pgtable_t; | ||
31 | 32 | ||
32 | #define pmd_val(x) ((x).pmd) | 33 | #define pmd_val(x) ((x).pmd) |
33 | #define pgd_val(x) ((x).pgd) | 34 | #define pgd_val(x) ((x).pgd) |
diff --git a/include/asm-m32r/pgalloc.h b/include/asm-m32r/pgalloc.h index e5921adfad1b..f11a2b909cdb 100644 --- a/include/asm-m32r/pgalloc.h +++ b/include/asm-m32r/pgalloc.h | |||
@@ -9,10 +9,11 @@ | |||
9 | set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte))) | 9 | set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(pte))) |
10 | 10 | ||
11 | static __inline__ void pmd_populate(struct mm_struct *mm, pmd_t *pmd, | 11 | static __inline__ void pmd_populate(struct mm_struct *mm, pmd_t *pmd, |
12 | struct page *pte) | 12 | pgtable_t pte) |
13 | { | 13 | { |
14 | set_pmd(pmd, __pmd(_PAGE_TABLE + page_to_phys(pte))); | 14 | set_pmd(pmd, __pmd(_PAGE_TABLE + page_to_phys(pte))); |
15 | } | 15 | } |
16 | #define pmd_pgtable(pmd) pmd_page(pmd) | ||
16 | 17 | ||
17 | /* | 18 | /* |
18 | * Allocate and free page tables. | 19 | * Allocate and free page tables. |
@@ -37,12 +38,12 @@ static __inline__ pte_t *pte_alloc_one_kernel(struct mm_struct *mm, | |||
37 | return pte; | 38 | return pte; |
38 | } | 39 | } |
39 | 40 | ||
40 | static __inline__ struct page *pte_alloc_one(struct mm_struct *mm, | 41 | static __inline__ pgtable_t pte_alloc_one(struct mm_struct *mm, |
41 | unsigned long address) | 42 | unsigned long address) |
42 | { | 43 | { |
43 | struct page *pte = alloc_page(GFP_KERNEL|__GFP_ZERO); | 44 | struct page *pte = alloc_page(GFP_KERNEL|__GFP_ZERO); |
44 | 45 | ||
45 | 46 | pgtable_page_ctor(pte); | |
46 | return pte; | 47 | return pte; |
47 | } | 48 | } |
48 | 49 | ||
@@ -51,8 +52,9 @@ static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) | |||
51 | free_page((unsigned long)pte); | 52 | free_page((unsigned long)pte); |
52 | } | 53 | } |
53 | 54 | ||
54 | static inline void pte_free(struct mm_struct *mm, struct page *pte) | 55 | static inline void pte_free(struct mm_struct *mm, pgtable_t pte) |
55 | { | 56 | { |
57 | pgtable_page_dtor(pte); | ||
56 | __free_page(pte); | 58 | __free_page(pte); |
57 | } | 59 | } |
58 | 60 | ||