diff options
Diffstat (limited to 'include/linux/mm.h')
| -rw-r--r-- | include/linux/mm.h | 33 | 
1 files changed, 24 insertions, 9 deletions
| diff --git a/include/linux/mm.h b/include/linux/mm.h index a0fbb9ffe380..a3cae495f9ce 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -155,7 +155,9 @@ extern int overcommit_kbytes_handler(struct ctl_table *, int, void __user *,   * mmap() functions).   */ -extern struct kmem_cache *vm_area_cachep; +struct vm_area_struct *vm_area_alloc(struct mm_struct *); +struct vm_area_struct *vm_area_dup(struct vm_area_struct *); +void vm_area_free(struct vm_area_struct *);  #ifndef CONFIG_MMU  extern struct rb_root nommu_region_tree; @@ -450,6 +452,23 @@ struct vm_operations_struct {  					  unsigned long addr);  }; +static inline void vma_init(struct vm_area_struct *vma, struct mm_struct *mm) +{ +	static const struct vm_operations_struct dummy_vm_ops = {}; + +	vma->vm_mm = mm; +	vma->vm_ops = &dummy_vm_ops; +	INIT_LIST_HEAD(&vma->anon_vma_chain); +} + +static inline void vma_set_anonymous(struct vm_area_struct *vma) +{ +	vma->vm_ops = NULL; +} + +/* flush_tlb_range() takes a vma, not a mm, and can care about flags */ +#define TLB_FLUSH_VMA(mm,flags) { .vm_mm = (mm), .vm_flags = (flags) } +  struct mmu_gather;  struct inode; @@ -2132,7 +2151,7 @@ extern int __meminit __early_pfn_to_nid(unsigned long pfn,  					struct mminit_pfnnid_cache *state);  #endif -#ifdef CONFIG_HAVE_MEMBLOCK +#if defined(CONFIG_HAVE_MEMBLOCK) && !defined(CONFIG_FLAT_NODE_MEM_MAP)  void zero_resv_unavail(void);  #else  static inline void zero_resv_unavail(void) {} @@ -2646,12 +2665,7 @@ extern int randomize_va_space;  const char * arch_vma_name(struct vm_area_struct *vma);  void print_vma_addr(char *prefix, unsigned long rip); -void sparse_mem_maps_populate_node(struct page **map_map, -				   unsigned long pnum_begin, -				   unsigned long pnum_end, -				   unsigned long map_count, -				   int nodeid); - +void *sparse_buffer_alloc(unsigned long size);  struct page *sparse_mem_map_populate(unsigned long pnum, int nid,  		struct vmem_altmap *altmap);  pgd_t *vmemmap_pgd_populate(unsigned long addr, int node); @@ -2733,7 +2747,8 @@ extern void clear_huge_page(struct page *page,  			    unsigned long addr_hint,  			    unsigned int pages_per_huge_page);  extern void copy_user_huge_page(struct page *dst, struct page *src, -				unsigned long addr, struct vm_area_struct *vma, +				unsigned long addr_hint, +				struct vm_area_struct *vma,  				unsigned int pages_per_huge_page);  extern long copy_huge_page_from_user(struct page *dst_page,  				const void __user *usr_src, |