summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authorjah <jah@FreeBSD.org>2015-08-04 19:46:13 +0000
committerjah <jah@FreeBSD.org>2015-08-04 19:46:13 +0000
commitb8c4d76738c091ce972e522ec36c8dce6642f6fb (patch)
treec099d6990763d6142f37775aa84b5193ad0b77fb /sys/vm
parentd6d829914b43c5cfe1482a423d5466cd717a330c (diff)
downloadFreeBSD-src-b8c4d76738c091ce972e522ec36c8dce6642f6fb.zip
FreeBSD-src-b8c4d76738c091ce972e522ec36c8dce6642f6fb.tar.gz
Add two new pmap functions:
vm_offset_t pmap_quick_enter_page(vm_page_t m) void pmap_quick_remove_page(vm_offset_t kva) These will create and destroy a temporary, CPU-local KVA mapping of a specified page. Guarantees: --Will not sleep and will not fail. --Safe to call under a non-sleepable lock or from an ithread Restrictions: --Not guaranteed to be safe to call from an interrupt filter or under a spin mutex on all platforms --Current implementation does not guarantee more than one page of mapping space across all platforms. MI code should not make nested calls to pmap_quick_enter_page. --MI code should not perform locking while holding onto a mapping created by pmap_quick_enter_page The idea is to use this in busdma, for bounce buffer copies as well as virtually-indexed cache maintenance on mips and arm. NOTE: the non-i386, non-amd64 implementations of these functions still need review and testing. Reviewed by: kib Approved by: kib (mentor) Differential Revision: http://reviews.freebsd.org/D3013
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/pmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/vm/pmap.h b/sys/vm/pmap.h
index d73babc..741ba3c 100644
--- a/sys/vm/pmap.h
+++ b/sys/vm/pmap.h
@@ -152,6 +152,8 @@ void pmap_unwire(pmap_t pmap, vm_offset_t start, vm_offset_t end);
void pmap_zero_page(vm_page_t);
void pmap_zero_page_area(vm_page_t, int off, int size);
void pmap_zero_page_idle(vm_page_t);
+vm_offset_t pmap_quick_enter_page(vm_page_t);
+void pmap_quick_remove_page(vm_offset_t);
#define pmap_resident_count(pm) ((pm)->pm_stats.resident_count)
#define pmap_wired_count(pm) ((pm)->pm_stats.wired_count)
OpenPOWER on IntegriCloud