diff options
Diffstat (limited to 'include/linux/mm.h')
| -rw-r--r-- | include/linux/mm.h | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 866a3dbe5c75..72a15dc26bbf 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -73,7 +73,7 @@ extern unsigned int kobjsize(const void *objp); | |||
| 73 | #endif | 73 | #endif |
| 74 | 74 | ||
| 75 | /* | 75 | /* |
| 76 | * vm_flags.. | 76 | * vm_flags in vm_area_struct, see mm_types.h. |
| 77 | */ | 77 | */ |
| 78 | #define VM_READ 0x00000001 /* currently active flags */ | 78 | #define VM_READ 0x00000001 /* currently active flags */ |
| 79 | #define VM_WRITE 0x00000002 | 79 | #define VM_WRITE 0x00000002 |
| @@ -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 *); |
