diff options
author | skra <skra@FreeBSD.org> | 2017-04-20 11:52:10 +0000 |
---|---|---|
committer | skra <skra@FreeBSD.org> | 2017-04-20 11:52:10 +0000 |
commit | 28e785bd9db197f512ffc1a04b12abc7282958b0 (patch) | |
tree | 02bc155df1d63c17319bee6c7161981ee3840fb3 /sys/arm | |
parent | ba2139e69a637c5ae023e9a75103661e7acd8322 (diff) | |
download | FreeBSD-src-28e785bd9db197f512ffc1a04b12abc7282958b0.zip FreeBSD-src-28e785bd9db197f512ffc1a04b12abc7282958b0.tar.gz |
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.
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/arm/pmap-v6.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c index 2894c35..1293147 100644 --- a/sys/arm/arm/pmap-v6.c +++ b/sys/arm/arm/pmap-v6.c @@ -2746,31 +2746,25 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG_RD, &pv_entry_spare, 0, /* * 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 addr, vm_paddr_t *locked_pa) 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)) != |