diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-09 17:00:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-09 17:00:58 -0500 |
commit | c40f6f8bbc4cbd2902671aacd587400ddca62627 (patch) | |
tree | a991e5521e10943f4457fb7f494e00aec75cc7df /include | |
parent | 1a7d0f0bec4be078ce2cfb11538c0f4ffbbed8e5 (diff) | |
parent | cb6ff208076b5f434db1b8c983429269d719cef5 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-nommu
* git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-nommu:
NOMMU: Support XIP on initramfs
NOMMU: Teach kobjsize() about VMA regions.
FLAT: Don't attempt to expand the userspace stack to fill the space allocated
FDPIC: Don't attempt to expand the userspace stack to fill the space allocated
NOMMU: Improve procfs output using per-MM VMAs
NOMMU: Make mmap allocation page trimming behaviour configurable.
NOMMU: Make VMAs per MM as for MMU-mode linux
NOMMU: Delete askedalloc and realalloc variables
NOMMU: Rename ARM's struct vm_region
NOMMU: Fix cleanup handling in ramfs_nommu_get_umapped_area()
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-frv/mmu.h | 1 | ||||
-rw-r--r-- | include/asm-m32r/mmu.h | 1 | ||||
-rw-r--r-- | include/linux/mm.h | 18 | ||||
-rw-r--r-- | include/linux/mm_types.h | 19 |
4 files changed, 24 insertions, 15 deletions
diff --git a/include/asm-frv/mmu.h b/include/asm-frv/mmu.h index 22c03714fb14..86ca0e86e7d2 100644 --- a/include/asm-frv/mmu.h +++ b/include/asm-frv/mmu.h | |||
@@ -22,7 +22,6 @@ typedef struct { | |||
22 | unsigned long dtlb_ptd_mapping; /* [DAMR5] PTD mapping for dtlb cached PGE */ | 22 | unsigned long dtlb_ptd_mapping; /* [DAMR5] PTD mapping for dtlb cached PGE */ |
23 | 23 | ||
24 | #else | 24 | #else |
25 | struct vm_list_struct *vmlist; | ||
26 | unsigned long end_brk; | 25 | unsigned long end_brk; |
27 | 26 | ||
28 | #endif | 27 | #endif |
diff --git a/include/asm-m32r/mmu.h b/include/asm-m32r/mmu.h index d9bd724479cf..150cb92bb666 100644 --- a/include/asm-m32r/mmu.h +++ b/include/asm-m32r/mmu.h | |||
@@ -4,7 +4,6 @@ | |||
4 | #if !defined(CONFIG_MMU) | 4 | #if !defined(CONFIG_MMU) |
5 | 5 | ||
6 | typedef struct { | 6 | typedef struct { |
7 | struct vm_list_struct *vmlist; | ||
8 | unsigned long end_brk; | 7 | unsigned long end_brk; |
9 | } mm_context_t; | 8 | } mm_context_t; |
10 | 9 | ||
diff --git a/include/linux/mm.h b/include/linux/mm.h index 4a3d28c86443..b91a73fd1bcc 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -56,19 +56,9 @@ extern unsigned long mmap_min_addr; | |||
56 | 56 | ||
57 | extern struct kmem_cache *vm_area_cachep; | 57 | extern 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 | */ | ||
64 | struct 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 |
70 | extern struct rb_root nommu_vma_tree; | 60 | extern struct rb_root nommu_region_tree; |
71 | extern struct rw_semaphore nommu_vma_sem; | 61 | extern struct rw_semaphore nommu_region_sem; |
72 | 62 | ||
73 | extern unsigned int kobjsize(const void *objp); | 63 | extern unsigned int kobjsize(const void *objp); |
74 | #endif | 64 | #endif |
@@ -1061,6 +1051,7 @@ extern void memmap_init_zone(unsigned long, int, unsigned long, | |||
1061 | unsigned long, enum memmap_context); | 1051 | unsigned long, enum memmap_context); |
1062 | extern void setup_per_zone_pages_min(void); | 1052 | extern void setup_per_zone_pages_min(void); |
1063 | extern void mem_init(void); | 1053 | extern void mem_init(void); |
1054 | extern void __init mmap_init(void); | ||
1064 | extern void show_mem(void); | 1055 | extern void show_mem(void); |
1065 | extern void si_meminfo(struct sysinfo * val); | 1056 | extern void si_meminfo(struct sysinfo * val); |
1066 | extern void si_meminfo_node(struct sysinfo *val, int nid); | 1057 | extern void si_meminfo_node(struct sysinfo *val, int nid); |
@@ -1072,6 +1063,9 @@ extern void setup_per_cpu_pageset(void); | |||
1072 | static inline void setup_per_cpu_pageset(void) {} | 1063 | static inline void setup_per_cpu_pageset(void) {} |
1073 | #endif | 1064 | #endif |
1074 | 1065 | ||
1066 | /* nommu.c */ | ||
1067 | extern atomic_t mmap_pages_allocated; | ||
1068 | |||
1075 | /* prio_tree.c */ | 1069 | /* prio_tree.c */ |
1076 | void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old); | 1070 | void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old); |
1077 | void vma_prio_tree_insert(struct vm_area_struct *, struct prio_tree_root *); | 1071 | void vma_prio_tree_insert(struct vm_area_struct *, struct prio_tree_root *); |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 9cfc9b627fdd..92915e81443f 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -97,6 +97,23 @@ struct page { | |||
97 | }; | 97 | }; |
98 | 98 | ||
99 | /* | 99 | /* |
100 | * A region containing a mapping of a non-memory backed file under NOMMU | ||
101 | * conditions. These are held in a global tree and are pinned by the VMAs that | ||
102 | * map parts of them. | ||
103 | */ | ||
104 | struct vm_region { | ||
105 | struct rb_node vm_rb; /* link in global region tree */ | ||
106 | unsigned long vm_flags; /* VMA vm_flags */ | ||
107 | unsigned long vm_start; /* start address of region */ | ||
108 | unsigned long vm_end; /* region initialised to here */ | ||
109 | unsigned long vm_top; /* region allocated to here */ | ||
110 | unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */ | ||
111 | struct file *vm_file; /* the backing file or NULL */ | ||
112 | |||
113 | atomic_t vm_usage; /* region usage count */ | ||
114 | }; | ||
115 | |||
116 | /* | ||
100 | * This struct defines a memory VMM memory area. There is one of these | 117 | * This struct defines a memory VMM memory area. There is one of these |
101 | * per VM-area/task. A VM area is any part of the process virtual memory | 118 | * per VM-area/task. A VM area is any part of the process virtual memory |
102 | * space that has a special rule for the page-fault handlers (ie a shared | 119 | * space that has a special rule for the page-fault handlers (ie a shared |
@@ -152,7 +169,7 @@ struct vm_area_struct { | |||
152 | unsigned long vm_truncate_count;/* truncate_count or restart_addr */ | 169 | unsigned long vm_truncate_count;/* truncate_count or restart_addr */ |
153 | 170 | ||
154 | #ifndef CONFIG_MMU | 171 | #ifndef CONFIG_MMU |
155 | atomic_t vm_usage; /* refcount (VMAs shared if !MMU) */ | 172 | struct vm_region *vm_region; /* NOMMU mapping region */ |
156 | #endif | 173 | #endif |
157 | #ifdef CONFIG_NUMA | 174 | #ifdef CONFIG_NUMA |
158 | struct mempolicy *vm_policy; /* NUMA policy for the VMA */ | 175 | struct mempolicy *vm_policy; /* NUMA policy for the VMA */ |