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()
This commit is contained in:
@@ -56,19 +56,9 @@ extern unsigned long mmap_min_addr;
|
||||
|
||||
extern struct kmem_cache *vm_area_cachep;
|
||||
|
||||
/*
|
||||
* This struct defines the per-mm list of VMAs for uClinux. If CONFIG_MMU is
|
||||
* disabled, then there's a single shared list of VMAs maintained by the
|
||||
* system, and mm's subscribe to these individually
|
||||
*/
|
||||
struct vm_list_struct {
|
||||
struct vm_list_struct *next;
|
||||
struct vm_area_struct *vma;
|
||||
};
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
extern struct rb_root nommu_vma_tree;
|
||||
extern struct rw_semaphore nommu_vma_sem;
|
||||
extern struct rb_root nommu_region_tree;
|
||||
extern struct rw_semaphore nommu_region_sem;
|
||||
|
||||
extern unsigned int kobjsize(const void *objp);
|
||||
#endif
|
||||
@@ -1061,6 +1051,7 @@ extern void memmap_init_zone(unsigned long, int, unsigned long,
|
||||
unsigned long, enum memmap_context);
|
||||
extern void setup_per_zone_pages_min(void);
|
||||
extern void mem_init(void);
|
||||
extern void __init mmap_init(void);
|
||||
extern void show_mem(void);
|
||||
extern void si_meminfo(struct sysinfo * val);
|
||||
extern void si_meminfo_node(struct sysinfo *val, int nid);
|
||||
@@ -1072,6 +1063,9 @@ extern void setup_per_cpu_pageset(void);
|
||||
static inline void setup_per_cpu_pageset(void) {}
|
||||
#endif
|
||||
|
||||
/* nommu.c */
|
||||
extern atomic_t mmap_pages_allocated;
|
||||
|
||||
/* prio_tree.c */
|
||||
void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old);
|
||||
void vma_prio_tree_insert(struct vm_area_struct *, struct prio_tree_root *);
|
||||
|
||||
@@ -96,6 +96,23 @@ struct page {
|
||||
#endif /* WANT_PAGE_VIRTUAL */
|
||||
};
|
||||
|
||||
/*
|
||||
* A region containing a mapping of a non-memory backed file under NOMMU
|
||||
* conditions. These are held in a global tree and are pinned by the VMAs that
|
||||
* map parts of them.
|
||||
*/
|
||||
struct vm_region {
|
||||
struct rb_node vm_rb; /* link in global region tree */
|
||||
unsigned long vm_flags; /* VMA vm_flags */
|
||||
unsigned long vm_start; /* start address of region */
|
||||
unsigned long vm_end; /* region initialised to here */
|
||||
unsigned long vm_top; /* region allocated to here */
|
||||
unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */
|
||||
struct file *vm_file; /* the backing file or NULL */
|
||||
|
||||
atomic_t vm_usage; /* region usage count */
|
||||
};
|
||||
|
||||
/*
|
||||
* This struct defines a memory VMM memory area. There is one of these
|
||||
* per VM-area/task. A VM area is any part of the process virtual memory
|
||||
@@ -152,7 +169,7 @@ struct vm_area_struct {
|
||||
unsigned long vm_truncate_count;/* truncate_count or restart_addr */
|
||||
|
||||
#ifndef CONFIG_MMU
|
||||
atomic_t vm_usage; /* refcount (VMAs shared if !MMU) */
|
||||
struct vm_region *vm_region; /* NOMMU mapping region */
|
||||
#endif
|
||||
#ifdef CONFIG_NUMA
|
||||
struct mempolicy *vm_policy; /* NUMA policy for the VMA */
|
||||
|
||||
Reference in New Issue
Block a user