aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index aaa8b843be28..b91a73fd1bcc 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -56,19 +56,9 @@ extern unsigned long mmap_min_addr;
56 56
57extern struct kmem_cache *vm_area_cachep; 57extern struct kmem_cache *vm_area_cachep;
58 58
59/*
60 * This struct defines the per-mm list of VMAs for uClinux. If CONFIG_MMU is
61 * disabled, then there's a single shared list of VMAs maintained by the
62 * system, and mm's subscribe to these individually
63 */
64struct vm_list_struct {
65 struct vm_list_struct *next;
66 struct vm_area_struct *vma;
67};
68
69#ifndef CONFIG_MMU 59#ifndef CONFIG_MMU
70extern struct rb_root nommu_vma_tree; 60extern struct rb_root nommu_region_tree;
71extern struct rw_semaphore nommu_vma_sem; 61extern struct rw_semaphore nommu_region_sem;
72 62
73extern unsigned int kobjsize(const void *objp); 63extern unsigned int kobjsize(const void *objp);
74#endif 64#endif
@@ -717,6 +707,11 @@ static inline int page_mapped(struct page *page)
717 707
718#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS) 708#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS)
719 709
710/*
711 * Can be called by the pagefault handler when it gets a VM_FAULT_OOM.
712 */
713extern void pagefault_out_of_memory(void);
714
720#define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK) 715#define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK)
721 716
722extern void show_free_areas(void); 717extern void show_free_areas(void);
@@ -1056,6 +1051,7 @@ extern void memmap_init_zone(unsigned long, int, unsigned long,
1056 unsigned long, enum memmap_context); 1051 unsigned long, enum memmap_context);
1057extern void setup_per_zone_pages_min(void); 1052extern void setup_per_zone_pages_min(void);
1058extern void mem_init(void); 1053extern void mem_init(void);
1054extern void __init mmap_init(void);
1059extern void show_mem(void); 1055extern void show_mem(void);
1060extern void si_meminfo(struct sysinfo * val); 1056extern void si_meminfo(struct sysinfo * val);
1061extern void si_meminfo_node(struct sysinfo *val, int nid); 1057extern void si_meminfo_node(struct sysinfo *val, int nid);
@@ -1067,6 +1063,9 @@ extern void setup_per_cpu_pageset(void);
1067static inline void setup_per_cpu_pageset(void) {} 1063static inline void setup_per_cpu_pageset(void) {}
1068#endif 1064#endif
1069 1065
1066/* nommu.c */
1067extern atomic_t mmap_pages_allocated;
1068
1070/* prio_tree.c */ 1069/* prio_tree.c */
1071void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old); 1070void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old);
1072void vma_prio_tree_insert(struct vm_area_struct *, struct prio_tree_root *); 1071void vma_prio_tree_insert(struct vm_area_struct *, struct prio_tree_root *);