Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Apr 2017 11:52:11 +0000 (UTC)
From:      Svatopluk Kraus <skra@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r317188 - stable/11/sys/arm/arm
Message-ID:  <201704201152.v3KBqB0T063931@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: skra
Date: Thu Apr 20 11:52:10 2017
New Revision: 317188
URL: https://svnweb.freebsd.org/changeset/base/317188

Log:
  MFC r308569,r308570:
  
    r308569:
      Always call PHYS_TO_VM_PAGE() in is_managed(). Fast road for addresses
      under first_page cannot be taken as this variable is connected only to
      vm_page_array segment. There could be more segments in system like the ones
      for various fictitious page ranges. These can be situated under
      vm_page_array segment and so, they could be skipped before this fix.
      However, as far as I know, there is no report associated with it.
    r308570:
      The return type of is_managed() was changed from boolean_t to bool type in
      r308569. Now, propagate this change further for consistency sake.

Modified:
  stable/11/sys/arm/arm/pmap-v6.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/arm/arm/pmap-v6.c
==============================================================================
--- stable/11/sys/arm/arm/pmap-v6.c	Thu Apr 20 11:32:18 2017	(r317187)
+++ stable/11/sys/arm/arm/pmap-v6.c	Thu Apr 20 11:52:10 2017	(r317188)
@@ -2746,31 +2746,25 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_
 /*
  *  Is given page managed?
  */
-static __inline boolean_t
+static __inline bool
 is_managed(vm_paddr_t pa)
 {
-	vm_offset_t pgnum;
 	vm_page_t m;
 
-	pgnum = atop(pa);
-	if (pgnum >= first_page) {
-		m = PHYS_TO_VM_PAGE(pa);
-		if (m == NULL)
-			return (FALSE);
-		if ((m->oflags & VPO_UNMANAGED) == 0)
-			return (TRUE);
-	}
-	return (FALSE);
+	m = PHYS_TO_VM_PAGE(pa);
+	if (m == NULL)
+		return (false);
+	return ((m->oflags & VPO_UNMANAGED) == 0);
 }
 
-static __inline boolean_t
+static __inline bool
 pte1_is_managed(pt1_entry_t pte1)
 {
 
 	return (is_managed(pte1_pa(pte1)));
 }
 
-static __inline boolean_t
+static __inline bool
 pte2_is_managed(pt2_entry_t pte2)
 {
 
@@ -6148,7 +6142,7 @@ pmap_mincore(pmap_t pmap, vm_offset_t ad
 	pt1_entry_t *pte1p, pte1;
 	pt2_entry_t *pte2p, pte2;
 	vm_paddr_t pa;
-	boolean_t managed;
+	bool managed;
 	int val;
 
 	PMAP_LOCK(pmap);
@@ -6175,7 +6169,7 @@ retry:
 		if (pte2 & PTE2_A)
 			val |= MINCORE_REFERENCED | MINCORE_REFERENCED_OTHER;
 	} else {
-		managed = FALSE;
+		managed = false;
 		val = 0;
 	}
 	if ((val & (MINCORE_MODIFIED_OTHER | MINCORE_REFERENCED_OTHER)) !=



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