diff options
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 6e695eaab4ce..fa651609b65d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -744,6 +744,8 @@ struct zap_details { | |||
744 | struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, | 744 | struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr, |
745 | pte_t pte); | 745 | pte_t pte); |
746 | 746 | ||
747 | int zap_vma_ptes(struct vm_area_struct *vma, unsigned long address, | ||
748 | unsigned long size); | ||
747 | unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address, | 749 | unsigned long zap_page_range(struct vm_area_struct *vma, unsigned long address, |
748 | unsigned long size, struct zap_details *); | 750 | unsigned long size, struct zap_details *); |
749 | unsigned long unmap_vmas(struct mmu_gather **tlb, | 751 | unsigned long unmap_vmas(struct mmu_gather **tlb, |
@@ -832,7 +834,6 @@ extern int mprotect_fixup(struct vm_area_struct *vma, | |||
832 | struct vm_area_struct **pprev, unsigned long start, | 834 | struct vm_area_struct **pprev, unsigned long start, |
833 | unsigned long end, unsigned long newflags); | 835 | unsigned long end, unsigned long newflags); |
834 | 836 | ||
835 | #ifdef CONFIG_HAVE_GET_USER_PAGES_FAST | ||
836 | /* | 837 | /* |
837 | * get_user_pages_fast provides equivalent functionality to get_user_pages, | 838 | * get_user_pages_fast provides equivalent functionality to get_user_pages, |
838 | * operating on current and current->mm (force=0 and doesn't return any vmas). | 839 | * operating on current and current->mm (force=0 and doesn't return any vmas). |
@@ -846,25 +847,6 @@ extern int mprotect_fixup(struct vm_area_struct *vma, | |||
846 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, | 847 | int get_user_pages_fast(unsigned long start, int nr_pages, int write, |
847 | struct page **pages); | 848 | struct page **pages); |
848 | 849 | ||
849 | #else | ||
850 | /* | ||
851 | * Should probably be moved to asm-generic, and architectures can include it if | ||
852 | * they don't implement their own get_user_pages_fast. | ||
853 | */ | ||
854 | #define get_user_pages_fast(start, nr_pages, write, pages) \ | ||
855 | ({ \ | ||
856 | struct mm_struct *mm = current->mm; \ | ||
857 | int ret; \ | ||
858 | \ | ||
859 | down_read(&mm->mmap_sem); \ | ||
860 | ret = get_user_pages(current, mm, start, nr_pages, \ | ||
861 | write, 0, pages, NULL); \ | ||
862 | up_read(&mm->mmap_sem); \ | ||
863 | \ | ||
864 | ret; \ | ||
865 | }) | ||
866 | #endif | ||
867 | |||
868 | /* | 850 | /* |
869 | * A callback you can register to apply pressure to ageable caches. | 851 | * A callback you can register to apply pressure to ageable caches. |
870 | * | 852 | * |
@@ -1041,7 +1023,6 @@ extern unsigned long absent_pages_in_range(unsigned long start_pfn, | |||
1041 | extern void get_pfn_range_for_nid(unsigned int nid, | 1023 | extern void get_pfn_range_for_nid(unsigned int nid, |
1042 | unsigned long *start_pfn, unsigned long *end_pfn); | 1024 | unsigned long *start_pfn, unsigned long *end_pfn); |
1043 | extern unsigned long find_min_pfn_with_active_regions(void); | 1025 | extern unsigned long find_min_pfn_with_active_regions(void); |
1044 | extern unsigned long find_max_pfn_with_active_regions(void); | ||
1045 | extern void free_bootmem_with_active_regions(int nid, | 1026 | extern void free_bootmem_with_active_regions(int nid, |
1046 | unsigned long max_low_pfn); | 1027 | unsigned long max_low_pfn); |
1047 | typedef int (*work_fn_t)(unsigned long, unsigned long, void *); | 1028 | typedef int (*work_fn_t)(unsigned long, unsigned long, void *); |
@@ -1104,6 +1085,9 @@ extern struct vm_area_struct *copy_vma(struct vm_area_struct **, | |||
1104 | unsigned long addr, unsigned long len, pgoff_t pgoff); | 1085 | unsigned long addr, unsigned long len, pgoff_t pgoff); |
1105 | extern void exit_mmap(struct mm_struct *); | 1086 | extern void exit_mmap(struct mm_struct *); |
1106 | 1087 | ||
1088 | extern int mm_take_all_locks(struct mm_struct *mm); | ||
1089 | extern void mm_drop_all_locks(struct mm_struct *mm); | ||
1090 | |||
1107 | #ifdef CONFIG_PROC_FS | 1091 | #ifdef CONFIG_PROC_FS |
1108 | /* From fs/proc/base.c. callers must _not_ hold the mm's exe_file_lock */ | 1092 | /* From fs/proc/base.c. callers must _not_ hold the mm's exe_file_lock */ |
1109 | extern void added_exe_file_vma(struct mm_struct *mm); | 1093 | extern void added_exe_file_vma(struct mm_struct *mm); |