diff options
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 2128ef7780c6..d87a5a5fe87d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -41,6 +41,9 @@ extern unsigned long mmap_min_addr; | |||
41 | 41 | ||
42 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) | 42 | #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) |
43 | 43 | ||
44 | /* to align the pointer to the (next) page boundary */ | ||
45 | #define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE) | ||
46 | |||
44 | /* | 47 | /* |
45 | * Linux kernel virtual memory manager primitives. | 48 | * Linux kernel virtual memory manager primitives. |
46 | * The idea being to have a "virtual" mm in the same way | 49 | * The idea being to have a "virtual" mm in the same way |
@@ -100,6 +103,7 @@ extern unsigned int kobjsize(const void *objp); | |||
100 | #define VM_DONTEXPAND 0x00040000 /* Cannot expand with mremap() */ | 103 | #define VM_DONTEXPAND 0x00040000 /* Cannot expand with mremap() */ |
101 | #define VM_RESERVED 0x00080000 /* Count as reserved_vm like IO */ | 104 | #define VM_RESERVED 0x00080000 /* Count as reserved_vm like IO */ |
102 | #define VM_ACCOUNT 0x00100000 /* Is a VM accounted object */ | 105 | #define VM_ACCOUNT 0x00100000 /* Is a VM accounted object */ |
106 | #define VM_NORESERVE 0x00200000 /* should the VM suppress accounting */ | ||
103 | #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ | 107 | #define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */ |
104 | #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ | 108 | #define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */ |
105 | #define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */ | 109 | #define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */ |
@@ -166,12 +170,16 @@ struct vm_operations_struct { | |||
166 | void (*open)(struct vm_area_struct * area); | 170 | void (*open)(struct vm_area_struct * area); |
167 | void (*close)(struct vm_area_struct * area); | 171 | void (*close)(struct vm_area_struct * area); |
168 | int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf); | 172 | int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf); |
169 | unsigned long (*nopfn)(struct vm_area_struct *area, | ||
170 | unsigned long address); | ||
171 | 173 | ||
172 | /* notification that a previously read-only page is about to become | 174 | /* notification that a previously read-only page is about to become |
173 | * writable, if an error is returned it will cause a SIGBUS */ | 175 | * writable, if an error is returned it will cause a SIGBUS */ |
174 | int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page); | 176 | int (*page_mkwrite)(struct vm_area_struct *vma, struct page *page); |
177 | |||
178 | /* called by access_process_vm when get_user_pages() fails, typically | ||
179 | * for use by special VMAs that can switch between memory and hardware | ||
180 | */ | ||
181 | int (*access)(struct vm_area_struct *vma, unsigned long addr, | ||
182 | void *buf, int len, int write); | ||
175 | #ifdef CONFIG_NUMA | 183 | #ifdef CONFIG_NUMA |
176 | /* | 184 | /* |
177 | * set_policy() op must add a reference to any non-NULL @new mempolicy | 185 | * set_policy() op must add a reference to any non-NULL @new mempolicy |
@@ -675,13 +683,6 @@ static inline int page_mapped(struct page *page) | |||
675 | } | 683 | } |
676 | 684 | ||
677 | /* | 685 | /* |
678 | * Error return values for the *_nopfn functions | ||
679 | */ | ||
680 | #define NOPFN_SIGBUS ((unsigned long) -1) | ||
681 | #define NOPFN_OOM ((unsigned long) -2) | ||
682 | #define NOPFN_REFAULT ((unsigned long) -3) | ||
683 | |||
684 | /* | ||
685 | * Different kinds of faults, as returned by handle_mm_fault(). | 686 | * Different kinds of faults, as returned by handle_mm_fault(). |
686 | * Used to decide whether a process gets delivered SIGBUS or | 687 | * Used to decide whether a process gets delivered SIGBUS or |
687 | * just gets major/minor fault counters bumped up. | 688 | * just gets major/minor fault counters bumped up. |
@@ -772,14 +773,14 @@ struct mm_walk { | |||
772 | 773 | ||
773 | int walk_page_range(unsigned long addr, unsigned long end, | 774 | int walk_page_range(unsigned long addr, unsigned long end, |
774 | struct mm_walk *walk); | 775 | struct mm_walk *walk); |
775 | void free_pgd_range(struct mmu_gather **tlb, unsigned long addr, | 776 | void free_pgd_range(struct mmu_gather *tlb, unsigned long addr, |
776 | unsigned long end, unsigned long floor, unsigned long ceiling); | 777 | unsigned long end, unsigned long floor, unsigned long ceiling); |
777 | void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *start_vma, | ||
778 | unsigned long floor, unsigned long ceiling); | ||
779 | int copy_page_range(struct mm_struct *dst, struct mm_struct *src, | 778 | int copy_page_range(struct mm_struct *dst, struct mm_struct *src, |
780 | struct vm_area_struct *vma); | 779 | struct vm_area_struct *vma); |
781 | void unmap_mapping_range(struct address_space *mapping, | 780 | void unmap_mapping_range(struct address_space *mapping, |
782 | loff_t const holebegin, loff_t const holelen, int even_cows); | 781 | loff_t const holebegin, loff_t const holelen, int even_cows); |
782 | int generic_access_phys(struct vm_area_struct *vma, unsigned long addr, | ||
783 | void *buf, int len, int write); | ||
783 | 784 | ||
784 | static inline void unmap_shared_mapping_range(struct address_space *mapping, | 785 | static inline void unmap_shared_mapping_range(struct address_space *mapping, |
785 | loff_t const holebegin, loff_t const holelen) | 786 | loff_t const holebegin, loff_t const holelen) |
@@ -965,9 +966,8 @@ static inline void pgtable_page_dtor(struct page *page) | |||
965 | NULL: pte_offset_kernel(pmd, address)) | 966 | NULL: pte_offset_kernel(pmd, address)) |
966 | 967 | ||
967 | extern void free_area_init(unsigned long * zones_size); | 968 | extern void free_area_init(unsigned long * zones_size); |
968 | extern void free_area_init_node(int nid, pg_data_t *pgdat, | 969 | extern void free_area_init_node(int nid, unsigned long * zones_size, |
969 | unsigned long * zones_size, unsigned long zone_start_pfn, | 970 | unsigned long zone_start_pfn, unsigned long *zholes_size); |
970 | unsigned long *zholes_size); | ||
971 | #ifdef CONFIG_ARCH_POPULATES_NODE_MAP | 971 | #ifdef CONFIG_ARCH_POPULATES_NODE_MAP |
972 | /* | 972 | /* |
973 | * With CONFIG_ARCH_POPULATES_NODE_MAP set, an architecture may initialise its | 973 | * With CONFIG_ARCH_POPULATES_NODE_MAP set, an architecture may initialise its |