diff options
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 6bef67d74adf..14ddd98b063f 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1131,7 +1131,8 @@ static inline int __pmd_alloc(struct mm_struct *mm, pud_t *pud, | |||
1131 | int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address); | 1131 | int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address); |
1132 | #endif | 1132 | #endif |
1133 | 1133 | ||
1134 | int __pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address); | 1134 | int __pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma, |
1135 | pmd_t *pmd, unsigned long address); | ||
1135 | int __pte_alloc_kernel(pmd_t *pmd, unsigned long address); | 1136 | int __pte_alloc_kernel(pmd_t *pmd, unsigned long address); |
1136 | 1137 | ||
1137 | /* | 1138 | /* |
@@ -1200,16 +1201,18 @@ static inline void pgtable_page_dtor(struct page *page) | |||
1200 | pte_unmap(pte); \ | 1201 | pte_unmap(pte); \ |
1201 | } while (0) | 1202 | } while (0) |
1202 | 1203 | ||
1203 | #define pte_alloc_map(mm, pmd, address) \ | 1204 | #define pte_alloc_map(mm, vma, pmd, address) \ |
1204 | ((unlikely(!pmd_present(*(pmd))) && __pte_alloc(mm, pmd, address))? \ | 1205 | ((unlikely(pmd_none(*(pmd))) && __pte_alloc(mm, vma, \ |
1205 | NULL: pte_offset_map(pmd, address)) | 1206 | pmd, address))? \ |
1207 | NULL: pte_offset_map(pmd, address)) | ||
1206 | 1208 | ||
1207 | #define pte_alloc_map_lock(mm, pmd, address, ptlp) \ | 1209 | #define pte_alloc_map_lock(mm, pmd, address, ptlp) \ |
1208 | ((unlikely(!pmd_present(*(pmd))) && __pte_alloc(mm, pmd, address))? \ | 1210 | ((unlikely(pmd_none(*(pmd))) && __pte_alloc(mm, NULL, \ |
1211 | pmd, address))? \ | ||
1209 | NULL: pte_offset_map_lock(mm, pmd, address, ptlp)) | 1212 | NULL: pte_offset_map_lock(mm, pmd, address, ptlp)) |
1210 | 1213 | ||
1211 | #define pte_alloc_kernel(pmd, address) \ | 1214 | #define pte_alloc_kernel(pmd, address) \ |
1212 | ((unlikely(!pmd_present(*(pmd))) && __pte_alloc_kernel(pmd, address))? \ | 1215 | ((unlikely(pmd_none(*(pmd))) && __pte_alloc_kernel(pmd, address))? \ |
1213 | NULL: pte_offset_kernel(pmd, address)) | 1216 | NULL: pte_offset_kernel(pmd, address)) |
1214 | 1217 | ||
1215 | extern void free_area_init(unsigned long * zones_size); | 1218 | extern void free_area_init(unsigned long * zones_size); |