svn commit: r353553 - stable/12/sys/riscv/riscv
Mark Johnston
markj at FreeBSD.org
Tue Oct 15 14:18:41 UTC 2019
Author: markj
Date: Tue Oct 15 14:18:40 2019
New Revision: 353553
URL: https://svnweb.freebsd.org/changeset/base/353553
Log:
MFC r353306:
Clear PGA_WRITEABLE in riscv's pmap_remove_l3().
Modified:
stable/12/sys/riscv/riscv/pmap.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/riscv/riscv/pmap.c
==============================================================================
--- stable/12/sys/riscv/riscv/pmap.c Tue Oct 15 14:18:01 2019 (r353552)
+++ stable/12/sys/riscv/riscv/pmap.c Tue Oct 15 14:18:40 2019 (r353553)
@@ -2090,6 +2090,7 @@ static int
pmap_remove_l3(pmap_t pmap, pt_entry_t *l3, vm_offset_t va,
pd_entry_t l2e, struct spglist *free, struct rwlock **lockp)
{
+ struct md_page *pvh;
pt_entry_t old_l3;
vm_paddr_t phys;
vm_page_t m;
@@ -2109,6 +2110,12 @@ pmap_remove_l3(pmap_t pmap, pt_entry_t *l3, vm_offset_
vm_page_aflag_set(m, PGA_REFERENCED);
CHANGE_PV_LIST_LOCK_TO_VM_PAGE(lockp, m);
pmap_pvh_free(&m->md, pmap, va);
+ if (TAILQ_EMPTY(&m->md.pv_list) &&
+ (m->flags & PG_FICTITIOUS) == 0) {
+ pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m));
+ if (TAILQ_EMPTY(&pvh->pv_list))
+ vm_page_aflag_clear(m, PGA_WRITEABLE);
+ }
}
return (pmap_unuse_pt(pmap, va, l2e, free));
More information about the svn-src-stable
mailing list