diff options
author | kib <kib@FreeBSD.org> | 2011-04-18 21:24:42 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2011-04-18 21:24:42 +0000 |
commit | 01863c379027d6ae674e4d811a85deca9de5f87d (patch) | |
tree | 88f86ce06cea062a4648c74fb719fd022ba91e0c /sys/i386/include | |
parent | 57baf3da41e06e14fc231a6361a34932b3de1c2a (diff) | |
download | FreeBSD-src-01863c379027d6ae674e4d811a85deca9de5f87d.zip FreeBSD-src-01863c379027d6ae674e4d811a85deca9de5f87d.tar.gz |
Make pmap_invalidate_cache_range() available for consumption on amd64.
Add pmap_invalidate_cache_pages() method on x86. It flushes the CPU
cache for the set of pages, which are not neccessary mapped. Since its
supposed use is to prepare the move of the pages ownership to a device
that does not snoop all CPU accesses to the main memory (read GPU in
GMCH), do not rely on CPU self-snoop feature.
amd64 implementation takes advantage of the direct map. On i386,
extract the helper pmap_flush_page() from pmap_page_set_memattr(), and
use it to make a temporary mapping of the flushed page.
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks
Diffstat (limited to 'sys/i386/include')
-rw-r--r-- | sys/i386/include/pmap.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h index 9751a52..eeada2e 100644 --- a/sys/i386/include/pmap.h +++ b/sys/i386/include/pmap.h @@ -522,7 +522,8 @@ void pmap_invalidate_page(pmap_t, vm_offset_t); void pmap_invalidate_range(pmap_t, vm_offset_t, vm_offset_t); void pmap_invalidate_all(pmap_t); void pmap_invalidate_cache(void); -void pmap_invalidate_cache_range(vm_offset_t, vm_offset_t); +void pmap_invalidate_cache_pages(vm_page_t *pages, int count); +void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); #endif /* _KERNEL */ |