Relax one of the new assertions in pmap_enter() a little. Specifically,
allow pmap_enter() to be performed on an unmanaged page that doesn't have VPO_BUSY set. Having VPO_BUSY set really only matters for managed pages. (See, for example, pmap_remove_write().)
This commit is contained in:
parent
953282002f
commit
9124d0d6a3
@ -3138,7 +3138,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m,
|
||||
KASSERT(va < UPT_MIN_ADDRESS || va >= UPT_MAX_ADDRESS,
|
||||
("pmap_enter: invalid to pmap_enter page table pages (va: 0x%lx)",
|
||||
va));
|
||||
KASSERT((m->oflags & VPO_BUSY) != 0,
|
||||
KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 ||
|
||||
(m->oflags & VPO_BUSY) != 0,
|
||||
("pmap_enter: page %p is not busy", m));
|
||||
|
||||
mpte = NULL;
|
||||
|
@ -3326,7 +3326,8 @@ pmap_enter_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
|
||||
pa = systempage.pv_pa;
|
||||
m = NULL;
|
||||
} else {
|
||||
KASSERT((m->oflags & VPO_BUSY) != 0 || (flags & M_NOWAIT) != 0,
|
||||
KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 ||
|
||||
(m->oflags & VPO_BUSY) != 0 || (flags & M_NOWAIT) != 0,
|
||||
("pmap_enter_locked: page %p is not busy", m));
|
||||
pa = VM_PAGE_TO_PHYS(m);
|
||||
}
|
||||
|
@ -3267,7 +3267,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m,
|
||||
KASSERT(va < UPT_MIN_ADDRESS || va >= UPT_MAX_ADDRESS,
|
||||
("pmap_enter: invalid to pmap_enter page table pages (va: 0x%x)",
|
||||
va));
|
||||
KASSERT((m->oflags & VPO_BUSY) != 0,
|
||||
KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 ||
|
||||
(m->oflags & VPO_BUSY) != 0,
|
||||
("pmap_enter: page %p is not busy", m));
|
||||
|
||||
mpte = NULL;
|
||||
|
@ -2673,7 +2673,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m,
|
||||
KASSERT(va < UPT_MIN_ADDRESS || va >= UPT_MAX_ADDRESS,
|
||||
("pmap_enter: invalid to pmap_enter page table pages (va: 0x%x)",
|
||||
va));
|
||||
KASSERT((m->oflags & VPO_BUSY) != 0,
|
||||
KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 ||
|
||||
(m->oflags & VPO_BUSY) != 0,
|
||||
("pmap_enter: page %p is not busy", m));
|
||||
|
||||
mpte = NULL;
|
||||
|
@ -1498,7 +1498,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m,
|
||||
|
||||
va &= ~PAGE_MASK;
|
||||
KASSERT(va <= VM_MAX_KERNEL_ADDRESS, ("pmap_enter: toobig"));
|
||||
KASSERT((m->oflags & VPO_BUSY) != 0,
|
||||
KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 ||
|
||||
(m->oflags & VPO_BUSY) != 0,
|
||||
("pmap_enter: page %p is not busy", m));
|
||||
|
||||
/*
|
||||
|
@ -1748,7 +1748,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m,
|
||||
|
||||
va &= ~PAGE_MASK;
|
||||
KASSERT(va <= VM_MAX_KERNEL_ADDRESS, ("pmap_enter: toobig"));
|
||||
KASSERT((m->oflags & VPO_BUSY) != 0,
|
||||
KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 ||
|
||||
(m->oflags & VPO_BUSY) != 0,
|
||||
("pmap_enter: page %p is not busy", m));
|
||||
|
||||
mpte = NULL;
|
||||
|
@ -1102,7 +1102,8 @@ moea_enter_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
|
||||
if (pmap_bootstrapped)
|
||||
mtx_assert(&vm_page_queue_mtx, MA_OWNED);
|
||||
PMAP_LOCK_ASSERT(pmap, MA_OWNED);
|
||||
KASSERT((m->oflags & VPO_BUSY) != 0 || VM_OBJECT_LOCKED(m->object),
|
||||
KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 ||
|
||||
(m->oflags & VPO_BUSY) != 0 || VM_OBJECT_LOCKED(m->object),
|
||||
("moea_enter_locked: page %p is not busy", m));
|
||||
|
||||
/* XXX change the pvo head for fake pages */
|
||||
|
@ -1235,7 +1235,8 @@ moea64_enter_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot,
|
||||
if (pmap_bootstrapped)
|
||||
mtx_assert(&vm_page_queue_mtx, MA_OWNED);
|
||||
PMAP_LOCK_ASSERT(pmap, MA_OWNED);
|
||||
KASSERT((m->oflags & VPO_BUSY) != 0 || VM_OBJECT_LOCKED(m->object),
|
||||
KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 ||
|
||||
(m->oflags & VPO_BUSY) != 0 || VM_OBJECT_LOCKED(m->object),
|
||||
("moea64_enter_locked: page %p is not busy", m));
|
||||
|
||||
/* XXX change the pvo head for fake pages */
|
||||
|
@ -1558,7 +1558,8 @@ mmu_booke_enter_locked(mmu_t mmu, pmap_t pmap, vm_offset_t va, vm_page_t m,
|
||||
KASSERT((va <= VM_MAXUSER_ADDRESS),
|
||||
("mmu_booke_enter_locked: user pmap, non user va"));
|
||||
}
|
||||
KASSERT((m->oflags & VPO_BUSY) != 0 || VM_OBJECT_LOCKED(m->object),
|
||||
KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 ||
|
||||
(m->oflags & VPO_BUSY) != 0 || VM_OBJECT_LOCKED(m->object),
|
||||
("mmu_booke_enter_locked: page %p is not busy", m));
|
||||
|
||||
PMAP_LOCK_ASSERT(pmap, MA_OWNED);
|
||||
|
@ -1351,7 +1351,8 @@ pmap_enter_locked(pmap_t pm, vm_offset_t va, vm_page_t m, vm_prot_t prot,
|
||||
|
||||
mtx_assert(&vm_page_queue_mtx, MA_OWNED);
|
||||
PMAP_LOCK_ASSERT(pm, MA_OWNED);
|
||||
KASSERT((m->oflags & VPO_BUSY) != 0 || VM_OBJECT_LOCKED(m->object),
|
||||
KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 ||
|
||||
(m->oflags & VPO_BUSY) != 0 || VM_OBJECT_LOCKED(m->object),
|
||||
("pmap_enter_locked: page %p is not busy", m));
|
||||
PMAP_STATS_INC(pmap_nenter);
|
||||
pa = VM_PAGE_TO_PHYS(m);
|
||||
|
@ -1084,7 +1084,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_prot_t access, vm_page_t m,
|
||||
vm_page_t om;
|
||||
int invlva;
|
||||
|
||||
KASSERT((m->oflags & VPO_BUSY) != 0,
|
||||
KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 ||
|
||||
(m->oflags & VPO_BUSY) != 0,
|
||||
("pmap_enter: page %p is not busy", m));
|
||||
if (pmap->pm_context)
|
||||
DPRINTF("pmap_enter(va=%lx, pa=0x%lx, prot=%x)\n", va,
|
||||
|
Loading…
x
Reference in New Issue
Block a user