Page MenuHomeFreeBSD

D30876.diff
No OneTemporary

D30876.diff

diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -2834,8 +2834,7 @@
{
struct md_page *pvh;
pt_entry_t old_l2;
- vm_offset_t eva, va;
- vm_page_t m, ml3;
+ vm_page_t m, ml3, mt;
PMAP_LOCK_ASSERT(pmap, MA_OWNED);
KASSERT((sva & L2_OFFSET) == 0, ("pmap_remove_l2: sva is not aligned"));
@@ -2853,19 +2852,18 @@
pmap->pm_stats.wired_count -= L2_SIZE / PAGE_SIZE;
pmap_resident_count_dec(pmap, L2_SIZE / PAGE_SIZE);
if (old_l2 & ATTR_SW_MANAGED) {
+ m = PHYS_TO_VM_PAGE(old_l2 & ~ATTR_MASK);
+ pvh = page_to_pvh(m);
CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, old_l2 & ~ATTR_MASK);
- pvh = pa_to_pvh(old_l2 & ~ATTR_MASK);
pmap_pvh_free(pvh, pmap, sva);
- eva = sva + L2_SIZE;
- for (va = sva, m = PHYS_TO_VM_PAGE(old_l2 & ~ATTR_MASK);
- va < eva; va += PAGE_SIZE, m++) {
+ for (mt = m; mt < &m[L2_SIZE / PAGE_SIZE]; mt++) {
if (pmap_pte_dirty(pmap, old_l2))
- vm_page_dirty(m);
+ vm_page_dirty(mt);
if (old_l2 & ATTR_AF)
- vm_page_aflag_set(m, PGA_REFERENCED);
- if (TAILQ_EMPTY(&m->md.pv_list) &&
+ vm_page_aflag_set(mt, PGA_REFERENCED);
+ if (TAILQ_EMPTY(&mt->md.pv_list) &&
TAILQ_EMPTY(&pvh->pv_list))
- vm_page_aflag_clear(m, PGA_WRITEABLE);
+ vm_page_aflag_clear(mt, PGA_WRITEABLE);
}
}
if (pmap == kernel_pmap) {

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 11:27 AM (21 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14696701
Default Alt Text
D30876.diff (1 KB)

Event Timeline