diff options
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 0986d19be0b7..6a75a7a78bf1 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -144,7 +144,8 @@ extern unsigned int kobjsize(const void *objp); | |||
144 | 144 | ||
145 | #define VM_GROWSDOWN 0x00000100 /* general info on the segment */ | 145 | #define VM_GROWSDOWN 0x00000100 /* general info on the segment */ |
146 | #define VM_GROWSUP 0x00000200 | 146 | #define VM_GROWSUP 0x00000200 |
147 | #define VM_SHM 0x00000400 /* shared memory area, don't swap out */ | 147 | #define VM_SHM 0x00000000 /* Means nothing: delete it later */ |
148 | #define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */ | ||
148 | #define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ | 149 | #define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ |
149 | 150 | ||
150 | #define VM_EXECUTABLE 0x00001000 | 151 | #define VM_EXECUTABLE 0x00001000 |
@@ -157,7 +158,7 @@ extern unsigned int kobjsize(const void *objp); | |||
157 | 158 | ||
158 | #define VM_DONTCOPY 0x00020000 /* Do not copy this vma on fork */ | 159 | #define VM_DONTCOPY 0x00020000 /* Do not copy this vma on fork */ |
159 | #define VM_DONTEXPAND 0x00040000 /* Cannot expand with mremap() */ | 160 | #define VM_DONTEXPAND 0x00040000 /* Cannot expand with mremap() */ |
160 | #define VM_RESERVED 0x00080000 /* Pages managed in a special way */ | 161 | #define VM_RESERVED 0x00080000 /* Count as reserved_vm like IO */ |
161 | #define VM_ACCOUNT 0x00100000 /* Is a VM accounted object */ | 162 | #define VM_ACCOUNT 0x00100000 /* Is a VM accounted object */ |
162 | #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ | 163 | #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ |
163 | #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ | 164 | #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ |
@@ -311,8 +312,6 @@ struct page { | |||
311 | 312 | ||
312 | extern void FASTCALL(__page_cache_release(struct page *)); | 313 | extern void FASTCALL(__page_cache_release(struct page *)); |
313 | 314 | ||
314 | #ifdef CONFIG_HUGETLB_PAGE | ||
315 | |||
316 | static inline int page_count(struct page *page) | 315 | static inline int page_count(struct page *page) |
317 | { | 316 | { |
318 | if (PageCompound(page)) | 317 | if (PageCompound(page)) |
@@ -329,23 +328,6 @@ static inline void get_page(struct page *page) | |||
329 | 328 | ||
330 | void put_page(struct page *page); | 329 | void put_page(struct page *page); |
331 | 330 | ||
332 | #else /* CONFIG_HUGETLB_PAGE */ | ||
333 | |||
334 | #define page_count(p) (atomic_read(&(p)->_count) + 1) | ||
335 | |||
336 | static inline void get_page(struct page *page) | ||
337 | { | ||
338 | atomic_inc(&page->_count); | ||
339 | } | ||
340 | |||
341 | static inline void put_page(struct page *page) | ||
342 | { | ||
343 | if (put_page_testzero(page)) | ||
344 | __page_cache_release(page); | ||
345 | } | ||
346 | |||
347 | #endif /* CONFIG_HUGETLB_PAGE */ | ||
348 | |||
349 | /* | 331 | /* |
350 | * Multiple processes may "see" the same page. E.g. for untouched | 332 | * Multiple processes may "see" the same page. E.g. for untouched |
351 | * mappings of /dev/null, all processes see the same page full of | 333 | * mappings of /dev/null, all processes see the same page full of |
@@ -682,6 +664,7 @@ struct zap_details { | |||
682 | unsigned long truncate_count; /* Compare vm_truncate_count */ | 664 | unsigned long truncate_count; /* Compare vm_truncate_count */ |
683 | }; | 665 | }; |
684 | 666 | ||
667 | struct page *vm_normal_page(struct vm_area_struct *, unsigned long, pte_t); | ||
685 | unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address, | 668 | unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address, |
686 | unsigned long size, struct zap_details *); | 669 | unsigned long size, struct zap_details *); |
687 | unsigned long unmap_vmas(struct mmu_gather **tlb, | 670 | unsigned long unmap_vmas(struct mmu_gather **tlb, |
@@ -971,7 +954,7 @@ unsigned long vmalloc_to_pfn(void *addr); | |||
971 | int remap_pfn_range(struct vm_area_struct *, unsigned long addr, | 954 | int remap_pfn_range(struct vm_area_struct *, unsigned long addr, |
972 | unsigned long pfn, unsigned long size, pgprot_t); | 955 | unsigned long pfn, unsigned long size, pgprot_t); |
973 | 956 | ||
974 | struct page *follow_page(struct mm_struct *, unsigned long address, | 957 | struct page *follow_page(struct vm_area_struct *, unsigned long address, |
975 | unsigned int foll_flags); | 958 | unsigned int foll_flags); |
976 | #define FOLL_WRITE 0x01 /* check pte is writable */ | 959 | #define FOLL_WRITE 0x01 /* check pte is writable */ |
977 | #define FOLL_TOUCH 0x02 /* mark page accessed */ | 960 | #define FOLL_TOUCH 0x02 /* mark page accessed */ |