Add page queue locking around functions that call vm_page_flag_set. This

fixes a failed assertion early in boot on sparc64.

Reported by:	Roderick van Domburg <r.s.a.vandomburg@student.utwente.nl>
This commit is contained in:
Jake Burkholder 2002-12-20 21:47:21 +00:00
parent 2952e1fb58
commit 9830739b64
2 changed files with 4 additions and 0 deletions

View File

@ -1502,7 +1502,9 @@ pmap_enter(pmap_t pm, vm_offset_t va, vm_page_t m, vm_prot_t prot,
if (tp != NULL) {
CTR0(KTR_PMAP, "pmap_enter: replace");
PMAP_STATS_INC(pmap_enter_nreplace);
vm_page_lock_queues();
pmap_remove_tte(pm, NULL, tp, va);
vm_page_unlock_queues();
tlb_page_demap(pm, va);
} else {
CTR0(KTR_PMAP, "pmap_enter: new");

View File

@ -167,7 +167,9 @@ tsb_tte_enter(pmap_t pm, vm_page_t m, vm_offset_t va, u_long sz, u_long data)
if ((tp->tte_data & TD_V) != 0) {
TSB_STATS_INC(tsb_nrepl);
ova = TTE_GET_VA(tp);
vm_page_lock_queues();
pmap_remove_tte(pm, NULL, tp, ova);
vm_page_unlock_queues();
tlb_page_demap(pm, ova);
}