aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ia64')
-rw-r--r--include/asm-ia64/a.out.h3
-rw-r--r--include/asm-ia64/page.h2
-rw-r--r--include/asm-ia64/pgalloc.h20
3 files changed, 16 insertions, 9 deletions
diff --git a/include/asm-ia64/a.out.h b/include/asm-ia64/a.out.h
index 7293ac1df3ab..193dcfb67596 100644
--- a/include/asm-ia64/a.out.h
+++ b/include/asm-ia64/a.out.h
@@ -29,7 +29,4 @@ struct exec {
29#define N_SYMSIZE(x) 0 29#define N_SYMSIZE(x) 0
30#define N_TXTOFF(x) 0 30#define N_TXTOFF(x) 0
31 31
32#ifdef __KERNEL__
33#include <asm/ustack.h>
34#endif
35#endif /* _ASM_IA64_A_OUT_H */ 32#endif /* _ASM_IA64_A_OUT_H */
diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h
index 8a8aa3fd7cd4..4999a6c63775 100644
--- a/include/asm-ia64/page.h
+++ b/include/asm-ia64/page.h
@@ -185,6 +185,7 @@ get_order (unsigned long size)
185#endif 185#endif
186 typedef struct { unsigned long pgd; } pgd_t; 186 typedef struct { unsigned long pgd; } pgd_t;
187 typedef struct { unsigned long pgprot; } pgprot_t; 187 typedef struct { unsigned long pgprot; } pgprot_t;
188 typedef struct page *pgtable_t;
188 189
189# define pte_val(x) ((x).pte) 190# define pte_val(x) ((x).pte)
190# define pmd_val(x) ((x).pmd) 191# define pmd_val(x) ((x).pmd)
@@ -206,6 +207,7 @@ get_order (unsigned long size)
206 typedef unsigned long pmd_t; 207 typedef unsigned long pmd_t;
207 typedef unsigned long pgd_t; 208 typedef unsigned long pgd_t;
208 typedef unsigned long pgprot_t; 209 typedef unsigned long pgprot_t;
210 typedef struct page *pgtable_t;
209# endif 211# endif
210 212
211# define pte_val(x) (x) 213# define pte_val(x) (x)
diff --git a/include/asm-ia64/pgalloc.h b/include/asm-ia64/pgalloc.h
index 556d988123ac..b9ac1a6fc216 100644
--- a/include/asm-ia64/pgalloc.h
+++ b/include/asm-ia64/pgalloc.h
@@ -70,10 +70,11 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
70#define __pmd_free_tlb(tlb, pmd) pmd_free((tlb)->mm, pmd) 70#define __pmd_free_tlb(tlb, pmd) pmd_free((tlb)->mm, pmd)
71 71
72static inline void 72static inline void
73pmd_populate(struct mm_struct *mm, pmd_t * pmd_entry, struct page *pte) 73pmd_populate(struct mm_struct *mm, pmd_t * pmd_entry, pgtable_t pte)
74{ 74{
75 pmd_val(*pmd_entry) = page_to_phys(pte); 75 pmd_val(*pmd_entry) = page_to_phys(pte);
76} 76}
77#define pmd_pgtable(pmd) pmd_page(pmd)
77 78
78static inline void 79static inline void
79pmd_populate_kernel(struct mm_struct *mm, pmd_t * pmd_entry, pte_t * pte) 80pmd_populate_kernel(struct mm_struct *mm, pmd_t * pmd_entry, pte_t * pte)
@@ -81,11 +82,17 @@ pmd_populate_kernel(struct mm_struct *mm, pmd_t * pmd_entry, pte_t * pte)
81 pmd_val(*pmd_entry) = __pa(pte); 82 pmd_val(*pmd_entry) = __pa(pte);
82} 83}
83 84
84static inline struct page *pte_alloc_one(struct mm_struct *mm, 85static inline pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long addr)
85 unsigned long addr)
86{ 86{
87 void *pg = quicklist_alloc(0, GFP_KERNEL, NULL); 87 struct page *page;
88 return pg ? virt_to_page(pg) : NULL; 88 void *pg;
89
90 pg = quicklist_alloc(0, GFP_KERNEL, NULL);
91 if (!pg)
92 return NULL;
93 page = virt_to_page(pg);
94 pgtable_page_ctor(page);
95 return page;
89} 96}
90 97
91static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, 98static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
@@ -94,8 +101,9 @@ static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
94 return quicklist_alloc(0, GFP_KERNEL, NULL); 101 return quicklist_alloc(0, GFP_KERNEL, NULL);
95} 102}
96 103
97static inline void pte_free(struct mm_struct *mm, struct page *pte) 104static inline void pte_free(struct mm_struct *mm, pgtable_t pte)
98{ 105{
106 pgtable_page_dtor(pte);
99 quicklist_free_page(0, NULL, pte); 107 quicklist_free_page(0, NULL, pte);
100} 108}
101 109