Port r353622 to sparc64 and arm v4.
Noted by: alc Reviewed by: alc, jeff, markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D22056
This commit is contained in:
parent
1dc8556358
commit
96448820a3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=353664
@ -2979,8 +2979,12 @@ 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 {
|
||||
if ((m->oflags & VPO_UNMANAGED) == 0)
|
||||
VM_PAGE_OBJECT_BUSY_ASSERT(m);
|
||||
if ((m->oflags & VPO_UNMANAGED) == 0) {
|
||||
if ((flags & PMAP_ENTER_QUICK_LOCKED) == 0)
|
||||
VM_PAGE_OBJECT_BUSY_ASSERT(m);
|
||||
else
|
||||
VM_OBJECT_ASSERT_LOCKED(m->object);
|
||||
}
|
||||
pa = VM_PAGE_TO_PHYS(m);
|
||||
}
|
||||
nflags = 0;
|
||||
@ -3253,7 +3257,8 @@ pmap_enter_object(pmap_t pmap, vm_offset_t start, vm_offset_t end,
|
||||
PMAP_LOCK(pmap);
|
||||
while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) {
|
||||
pmap_enter_locked(pmap, start + ptoa(diff), m, prot &
|
||||
(VM_PROT_READ | VM_PROT_EXECUTE), PMAP_ENTER_NOSLEEP);
|
||||
(VM_PROT_READ | VM_PROT_EXECUTE), PMAP_ENTER_NOSLEEP |
|
||||
PMAP_ENTER_QUICK_LOCKED);
|
||||
m = TAILQ_NEXT(m, listq);
|
||||
}
|
||||
rw_wunlock(&pvh_global_lock);
|
||||
@ -3276,7 +3281,7 @@ pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot)
|
||||
rw_wlock(&pvh_global_lock);
|
||||
PMAP_LOCK(pmap);
|
||||
pmap_enter_locked(pmap, va, m, prot & (VM_PROT_READ | VM_PROT_EXECUTE),
|
||||
PMAP_ENTER_NOSLEEP);
|
||||
PMAP_ENTER_NOSLEEP | PMAP_ENTER_QUICK_LOCKED);
|
||||
rw_wunlock(&pvh_global_lock);
|
||||
PMAP_UNLOCK(pmap);
|
||||
}
|
||||
|
@ -75,5 +75,7 @@ pmap_vmspace_copy(pmap_t dst_pmap __unused, pmap_t src_pmap __unused)
|
||||
return (0);
|
||||
}
|
||||
|
||||
#define PMAP_ENTER_QUICK_LOCKED 0x10000000
|
||||
|
||||
#endif /* _KERNEL */
|
||||
#endif /* !_MACHINE_PMAP_H_ */
|
||||
|
@ -50,6 +50,7 @@
|
||||
#include <machine/tte.h>
|
||||
|
||||
#define PMAP_CONTEXT_MAX 8192
|
||||
#define PMAP_ENTER_QUICK_LOCKED 0x10000000
|
||||
|
||||
typedef struct pmap *pmap_t;
|
||||
|
||||
|
@ -1500,8 +1500,12 @@ pmap_enter_locked(pmap_t pm, vm_offset_t va, vm_page_t m, vm_prot_t prot,
|
||||
|
||||
rw_assert(&tte_list_global_lock, RA_WLOCKED);
|
||||
PMAP_LOCK_ASSERT(pm, MA_OWNED);
|
||||
if ((m->oflags & VPO_UNMANAGED) == 0)
|
||||
VM_PAGE_OBJECT_BUSY_ASSERT(m);
|
||||
if ((m->oflags & VPO_UNMANAGED) == 0) {
|
||||
if ((flags & PMAP_ENTER_QUICK_LOCKED) == 0)
|
||||
VM_PAGE_OBJECT_BUSY_ASSERT(m);
|
||||
else
|
||||
VM_OBJECT_ASSERT_LOCKED(m->object);
|
||||
}
|
||||
PMAP_STATS_INC(pmap_nenter);
|
||||
pa = VM_PAGE_TO_PHYS(m);
|
||||
wired = (flags & PMAP_ENTER_WIRED) != 0;
|
||||
@ -1649,7 +1653,8 @@ pmap_enter_object(pmap_t pm, vm_offset_t start, vm_offset_t end,
|
||||
PMAP_LOCK(pm);
|
||||
while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) {
|
||||
pmap_enter_locked(pm, start + ptoa(diff), m, prot &
|
||||
(VM_PROT_READ | VM_PROT_EXECUTE), 0, 0);
|
||||
(VM_PROT_READ | VM_PROT_EXECUTE),
|
||||
PMAP_ENTER_QUICK_LOCKED, 0);
|
||||
m = TAILQ_NEXT(m, listq);
|
||||
}
|
||||
rw_wunlock(&tte_list_global_lock);
|
||||
@ -1663,7 +1668,7 @@ pmap_enter_quick(pmap_t pm, vm_offset_t va, vm_page_t m, vm_prot_t prot)
|
||||
rw_wlock(&tte_list_global_lock);
|
||||
PMAP_LOCK(pm);
|
||||
pmap_enter_locked(pm, va, m, prot & (VM_PROT_READ | VM_PROT_EXECUTE),
|
||||
0, 0);
|
||||
PMAP_ENTER_QUICK_LOCKED, 0);
|
||||
rw_wunlock(&tte_list_global_lock);
|
||||
PMAP_UNLOCK(pm);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user