Index: sys/arm64/arm64/pmap.c =================================================================== --- sys/arm64/arm64/pmap.c +++ sys/arm64/arm64/pmap.c @@ -913,11 +913,10 @@ } static __inline void -pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +pmap_invalidate_range_nopin(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { vm_offset_t addr; - sched_pin(); dsb(ishst); for (addr = sva; addr < eva; addr += PAGE_SIZE) { __asm __volatile( @@ -926,6 +925,14 @@ __asm __volatile( "dsb ish \n" "isb \n"); +} + +static __inline void +pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +{ + + sched_pin(); + pmap_invalidate_range_nopin(pmap, sva, eva); sched_unpin(); } @@ -2675,7 +2682,7 @@ /* Clear the old mapping */ pmap_load_clear(pte); - pmap_invalidate_range(pmap, va, va + size); + pmap_invalidate_range_nopin(pmap, va, va + size); /* Create the new mapping */ pmap_load_store(pte, newpte);