pmap arm64: fixing pmap_invalidate_range

It seems that if range within one page is given this page will not be
invalidated at all. Clean it up.

Submitted by:          Dominik Ermel <der@semihalf.com>
Obtained from:         Semihalf
Sponsored by:          Cavium
Reviewed by:           wma, zbb
Approved by:           cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D5569
This commit is contained in:
Wojciech Macek 2016-03-14 07:26:38 +00:00
parent 9147c9b8b2
commit f54153bb08

View File

@ -772,12 +772,10 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
vm_offset_t addr;
sched_pin();
sva >>= PAGE_SHIFT;
eva >>= PAGE_SHIFT;
__asm __volatile("dsb sy");
for (addr = sva; addr < eva; addr++) {
for (addr = sva; addr < eva; addr += PAGE_SIZE) {
__asm __volatile(
"tlbi vaae1is, %0" : : "r"(addr));
"tlbi vaae1is, %0" : : "r"(addr >> PAGE_SHIFT));
}
__asm __volatile(
"dsb sy \n"