Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Oct 2019 15:54:22 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r353475 - stable/12/sys/riscv/riscv
Message-ID:  <201910131554.x9DFsMWY064648@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Sun Oct 13 15:54:22 2019
New Revision: 353475
URL: https://svnweb.freebsd.org/changeset/base/353475

Log:
  MFC r353308:
  Avoid erroneously clearing PGA_WRITEABLE in riscv's pmap_enter().

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	Sun Oct 13 15:42:41 2019	(r353474)
+++ stable/12/sys/riscv/riscv/pmap.c	Sun Oct 13 15:54:22 2019	(r353475)
@@ -2830,7 +2830,9 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, v
 			if ((new_l3 & PTE_SW_MANAGED) == 0)
 				free_pv_entry(pmap, pv);
 			if ((om->aflags & PGA_WRITEABLE) != 0 &&
-			    TAILQ_EMPTY(&om->md.pv_list))
+			    TAILQ_EMPTY(&om->md.pv_list) &&
+			    ((om->flags & PG_FICTITIOUS) != 0 ||
+			    TAILQ_EMPTY(&pa_to_pvh(opa)->pv_list)))
 				vm_page_aflag_clear(om, PGA_WRITEABLE);
 		}
 		pmap_invalidate_page(pmap, va);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910131554.x9DFsMWY064648>