diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-28 17:34:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-28 17:34:23 -0500 |
commit | 6aab341e0a28aff100a09831c5300a2994b8b986 (patch) | |
tree | 1af3908275aa5e1b16e80efee554a9a7504c56d4 /arch | |
parent | 458af5439fe7ae7d95ca14106844e61f0795166c (diff) |
mm: re-architect the VM_UNPAGED logic
This replaces the (in my opinion horrible) VM_UNMAPPED logic with very
explicit support for a "remapped page range" aka VM_PFNMAP. It allows a
VM area to contain an arbitrary range of page table entries that the VM
never touches, and never considers to be normal pages.
Any user of "remap_pfn_range()" automatically gets this new
functionality, and doesn't even have to mark the pages reserved or
indeed mark them any other way. It just works. As a side effect, doing
mmap() on /dev/mem works for arbitrary ranges.
Sparc update from David in the next commit.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/vdso.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index b44b36e0c293..f0c47dab0903 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c | |||
@@ -145,8 +145,7 @@ static void dump_vdso_pages(struct vm_area_struct * vma) | |||
145 | struct page *pg = virt_to_page(vdso32_kbase + | 145 | struct page *pg = virt_to_page(vdso32_kbase + |
146 | i*PAGE_SIZE); | 146 | i*PAGE_SIZE); |
147 | struct page *upg = (vma && vma->vm_mm) ? | 147 | struct page *upg = (vma && vma->vm_mm) ? |
148 | follow_page(vma->vm_mm, vma->vm_start + | 148 | follow_page(vma, vma->vm_start + i*PAGE_SIZE, 0) |
149 | i*PAGE_SIZE, 0) | ||
150 | : NULL; | 149 | : NULL; |
151 | dump_one_vdso_page(pg, upg); | 150 | dump_one_vdso_page(pg, upg); |
152 | } | 151 | } |
@@ -157,8 +156,7 @@ static void dump_vdso_pages(struct vm_area_struct * vma) | |||
157 | struct page *pg = virt_to_page(vdso64_kbase + | 156 | struct page *pg = virt_to_page(vdso64_kbase + |
158 | i*PAGE_SIZE); | 157 | i*PAGE_SIZE); |
159 | struct page *upg = (vma && vma->vm_mm) ? | 158 | struct page *upg = (vma && vma->vm_mm) ? |
160 | follow_page(vma->vm_mm, vma->vm_start + | 159 | follow_page(vma, vma->vm_start + i*PAGE_SIZE, 0) |
161 | i*PAGE_SIZE, 0) | ||
162 | : NULL; | 160 | : NULL; |
163 | dump_one_vdso_page(pg, upg); | 161 | dump_one_vdso_page(pg, upg); |
164 | } | 162 | } |