Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Jan 2019 17:08:46 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r342764 - head/sys/riscv/riscv
Message-ID:  <201901041708.x04H8kTJ027548@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Fri Jan  4 17:08:45 2019
New Revision: 342764
URL: https://svnweb.freebsd.org/changeset/base/342764

Log:
  Clear PGA_WRITEABLE in pmap_remove_pages().
  
  Reviewed by:	kib
  MFC after:	1 week
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D18731

Modified:
  head/sys/riscv/riscv/pmap.c

Modified: head/sys/riscv/riscv/pmap.c
==============================================================================
--- head/sys/riscv/riscv/pmap.c	Fri Jan  4 16:47:35 2019	(r342763)
+++ head/sys/riscv/riscv/pmap.c	Fri Jan  4 17:08:45 2019	(r342764)
@@ -2754,6 +2754,9 @@ pmap_remove_pages(pmap_t pmap)
 				pmap_resident_count_dec(pmap, 1);
 				TAILQ_REMOVE(&m->md.pv_list, pv, pv_next);
 				m->md.pv_gen++;
+				if (TAILQ_EMPTY(&m->md.pv_list) &&
+				    (m->aflags & PGA_WRITEABLE) != 0)
+					vm_page_aflag_clear(m, PGA_WRITEABLE);
 
 				pmap_unuse_l3(pmap, pv->pv_va, ptepde, &free);
 				freed++;



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