diff options
| author | David Howells <dhowells@redhat.com> | 2005-01-04 05:21:58 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-04 05:21:58 -0800 |
| commit | b683effb9a2fd461f4a8833539e1b33346923216 (patch) | |
| tree | 5213ed03f7d6a69099d9674508189191c13ebffb /include/linux | |
| parent | 17c9f1a24c938a185e90ee6f786526ab3475820d (diff) | |
[PATCH] Further nommu changes
The attached patch further changes the nommu stuff previously changed. These
new changes do the following:
(0) Some additional variables have been defined to make nommu even compile.
(1) Get rid of the alternate vm_area_struct. The nommu mmap now uses the
normal one. There's a refcount field added to the normal one, contingent
on !CONFIG_MMU.
(2) vm_rb is now used to keep track of the VMAs in an rbtree rather than
adding a separate list.
(3) mm_tblock_struct is now vm_list_struct.
(4) put_vma() now calls vma->vm_ops->close() if available on nommu.
(5) A dummy generic_file_vm_ops has been provided. It does nothing, but
permits tiny-shmem to compile.
tiny-shmem and ramfs still need attention, such that files contained
therein can be mmapped shared-writably to some extent on nommu.
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mm.h | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 8e78cac955d1..e1b1fe113129 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -58,7 +58,6 @@ extern int sysctl_legacy_va_layout; * space that has a special rule for the page-fault handlers (ie a shared * library, the executable area etc). */ -#ifdef CONFIG_MMU struct vm_area_struct { struct mm_struct * vm_mm; /* The address space we belong to. */ unsigned long vm_start; /* Our start address within vm_mm. */ @@ -107,34 +106,29 @@ struct vm_area_struct { struct file * vm_file; /* File we map to (can be NULL). */ void * vm_private_data; /* was vm_pte (shared mem) */ +#ifndef CONFIG_MMU + atomic_t vm_usage; /* refcount (VMAs shared if !MMU) */ +#endif #ifdef CONFIG_NUMA struct mempolicy *vm_policy; /* NUMA policy for the VMA */ #endif }; -#else - -struct vm_area_struct { - struct list_head vm_link; /* system object list */ - atomic_t vm_usage; /* count of refs */ - unsigned long vm_start; - unsigned long vm_end; - pgprot_t vm_page_prot; /* access permissions of this VMA */ - unsigned long vm_flags; - unsigned long vm_pgoff; - struct file *vm_file; /* file or device mapped */ -}; - -struct mm_tblock_struct { - struct mm_tblock_struct *next; +/* + * 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; }; -extern struct list_head nommu_vma_list; +#ifndef CONFIG_MMU +extern struct rb_root nommu_vma_tree; extern struct rw_semaphore nommu_vma_sem; extern unsigned int kobjsize(const void *objp); - #endif /* |
