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>
This commit is contained in:
@@ -145,8 +145,7 @@ static void dump_vdso_pages(struct vm_area_struct * vma)
|
||||
struct page *pg = virt_to_page(vdso32_kbase +
|
||||
i*PAGE_SIZE);
|
||||
struct page *upg = (vma && vma->vm_mm) ?
|
||||
follow_page(vma->vm_mm, vma->vm_start +
|
||||
i*PAGE_SIZE, 0)
|
||||
follow_page(vma, vma->vm_start + i*PAGE_SIZE, 0)
|
||||
: NULL;
|
||||
dump_one_vdso_page(pg, upg);
|
||||
}
|
||||
@@ -157,8 +156,7 @@ static void dump_vdso_pages(struct vm_area_struct * vma)
|
||||
struct page *pg = virt_to_page(vdso64_kbase +
|
||||
i*PAGE_SIZE);
|
||||
struct page *upg = (vma && vma->vm_mm) ?
|
||||
follow_page(vma->vm_mm, vma->vm_start +
|
||||
i*PAGE_SIZE, 0)
|
||||
follow_page(vma, vma->vm_start + i*PAGE_SIZE, 0)
|
||||
: NULL;
|
||||
dump_one_vdso_page(pg, upg);
|
||||
}
|
||||
|
Reference in New Issue
Block a user