Local TLB flush is sufficient in pmap_remove_pages().
(1) The pmap argument passed to the function must be current pmap only. (2) The process must be single threaded as the function is called either when a process is exiting or from exec_new_vmspace(). Remove pmap_tlb_flush_ng() which is not used anywhere now. Approved by: kib (mentor)
This commit is contained in:
parent
52e53e2de0
commit
b500ef0907
@ -1380,14 +1380,6 @@ pmap_tlb_flush_range(pmap_t pmap, vm_offset_t sva, vm_size_t size)
|
||||
tlb_flush_range(sva, size);
|
||||
}
|
||||
|
||||
PMAP_INLINE void
|
||||
pmap_tlb_flush_ng(pmap_t pmap)
|
||||
{
|
||||
|
||||
if (pmap == kernel_pmap || !CPU_EMPTY(&pmap->pm_active))
|
||||
tlb_flush_all_ng();
|
||||
}
|
||||
|
||||
/*
|
||||
* Abuse the pte2 nodes for unmapped kva to thread a kva freelist through.
|
||||
* Requirements:
|
||||
@ -4233,8 +4225,8 @@ pmap_remove_pages(pmap_t pmap)
|
||||
free_pv_chunk(pc);
|
||||
}
|
||||
}
|
||||
tlb_flush_all_ng_local();
|
||||
sched_unpin();
|
||||
pmap_tlb_flush_ng(pmap);
|
||||
rw_wunlock(&pvh_global_lock);
|
||||
PMAP_UNLOCK(pmap);
|
||||
pmap_free_zero_pages(&free);
|
||||
|
@ -196,7 +196,6 @@ void pmap_set_pcb_pagedir(pmap_t , struct pcb *);
|
||||
|
||||
void pmap_tlb_flush(pmap_t , vm_offset_t );
|
||||
void pmap_tlb_flush_range(pmap_t , vm_offset_t , vm_size_t );
|
||||
void pmap_tlb_flush_ng(pmap_t );
|
||||
|
||||
void pmap_dcache_wb_range(vm_paddr_t , vm_size_t , vm_memattr_t );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user