diff options
author | kib <kib@FreeBSD.org> | 2013-03-14 20:18:12 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2013-03-14 20:18:12 +0000 |
commit | 63efc821c3e4785928997ea88e1de93e62ce3acb (patch) | |
tree | 7fc0d10a416efdb974f78de808274b7ebcd9475a /sys/vm | |
parent | 4824f825377f483e33c726bad073beda774d9f4b (diff) | |
download | FreeBSD-src-63efc821c3e4785928997ea88e1de93e62ce3acb.zip FreeBSD-src-63efc821c3e4785928997ea88e1de93e62ce3acb.tar.gz |
Add pmap function pmap_copy_pages(), which copies the content of the
pages around, taking array of vm_page_t both for source and
destination. Starting offsets and total transfer size are specified.
The function implements optimal algorithm for copying using the
platform-specific optimizations. For instance, on the architectures
were the direct map is available, no transient mappings are created,
for i386 the per-cpu ephemeral page frame is used. The code was
typically borrowed from the pmap_copy_page() for the same
architecture.
Only i386/amd64, powerpc aim and arm/arm-v6 implementations were
tested at the time of commit. High-level code, not committed yet to
the tree, ensures that the use of the function is only allowed after
explicit enablement.
For sparc64, the existing code has known issues and a stab is added
instead, to allow the kernel linking.
Sponsored by: The FreeBSD Foundation
Tested by: pho (i386, amd64), scottl (amd64), ian (arm and arm-v6)
MFC after: 2 weeks
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/pmap.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/vm/pmap.h b/sys/vm/pmap.h index d06c22b..c64a549 100644 --- a/sys/vm/pmap.h +++ b/sys/vm/pmap.h @@ -108,6 +108,8 @@ void pmap_clear_modify(vm_page_t m); void pmap_clear_reference(vm_page_t m); void pmap_copy(pmap_t, pmap_t, vm_offset_t, vm_size_t, vm_offset_t); void pmap_copy_page(vm_page_t, vm_page_t); +void pmap_copy_pages(vm_page_t ma[], vm_offset_t a_offset, + vm_page_t mb[], vm_offset_t b_offset, int xfersize); void pmap_enter(pmap_t, vm_offset_t, vm_prot_t, vm_page_t, vm_prot_t, boolean_t); void pmap_enter_object(pmap_t pmap, vm_offset_t start, |