diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 61dfd2607b40..d5a79e453207 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1807,7 +1807,6 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) ("pmap_invalidate_page: invalid type %d", pmap->pm_type)); sched_pin(); - smp_masked_invlpg(pmap_invalidate_cpu_mask(pmap), va, pmap); if (pmap == kernel_pmap) { invlpg(va); } else { @@ -1815,6 +1814,7 @@ pmap_invalidate_page(pmap_t pmap, vm_offset_t va) invlpg(va); pmap_invalidate_page_mode(pmap, va); } + smp_masked_invlpg(pmap_invalidate_cpu_mask(pmap), va, pmap); sched_unpin(); } @@ -1910,7 +1910,6 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) ("pmap_invalidate_range: invalid type %d", pmap->pm_type)); sched_pin(); - smp_masked_invlpg_range(pmap_invalidate_cpu_mask(pmap), sva, eva, pmap); if (pmap == kernel_pmap) { for (addr = sva; addr < eva; addr += PAGE_SIZE) invlpg(addr); @@ -1921,6 +1920,7 @@ pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) } pmap_invalidate_range_mode(pmap, sva, eva); } + smp_masked_invlpg_range(pmap_invalidate_cpu_mask(pmap), sva, eva, pmap); sched_unpin(); } @@ -2021,8 +2021,8 @@ pmap_invalidate_all(pmap_t pmap) ("pmap_invalidate_all: invalid type %d", pmap->pm_type)); sched_pin(); - smp_masked_invltlb(pmap_invalidate_cpu_mask(pmap), pmap); pmap_invalidate_all_mode(pmap); + smp_masked_invltlb(pmap_invalidate_cpu_mask(pmap), pmap); sched_unpin(); }