]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add two new pmap functions:
authorjah <jah@FreeBSD.org>
Tue, 4 Aug 2015 19:46:13 +0000 (19:46 +0000)
committerjah <jah@FreeBSD.org>
Tue, 4 Aug 2015 19:46:13 +0000 (19:46 +0000)
commitb8c4d76738c091ce972e522ec36c8dce6642f6fb
treec099d6990763d6142f37775aa84b5193ad0b77fb
parentd6d829914b43c5cfe1482a423d5466cd717a330c
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
18 files changed:
sys/amd64/amd64/pmap.c
sys/arm/arm/pmap-v6-new.c
sys/arm/arm/pmap-v6.c
sys/arm/arm/pmap.c
sys/arm/include/pcpu.h
sys/arm64/arm64/pmap.c
sys/i386/i386/pmap.c
sys/i386/include/pcpu.h
sys/mips/mips/pmap.c
sys/powerpc/aim/mmu_oea.c
sys/powerpc/aim/mmu_oea64.c
sys/powerpc/booke/pmap.c
sys/powerpc/include/pcpu.h
sys/powerpc/powerpc/mmu_if.m
sys/powerpc/powerpc/pmap_dispatch.c
sys/sparc64/include/pcpu.h
sys/sparc64/sparc64/pmap.c
sys/vm/pmap.h