svn commit: r308569 - head/sys/arm/arm
Svatopluk Kraus
skra at FreeBSD.org
Sat Nov 12 17:03:22 UTC 2016
Author: skra
Date: Sat Nov 12 17:03:21 2016
New Revision: 308569
URL: https://svnweb.freebsd.org/changeset/base/308569
Log:
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.
While here, the return type of this function is changed from boolean_t
to bool type.
Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8502
Modified:
head/sys/arm/arm/pmap-v6.c
Modified: head/sys/arm/arm/pmap-v6.c
==============================================================================
--- head/sys/arm/arm/pmap-v6.c Sat Nov 12 05:09:39 2016 (r308568)
+++ head/sys/arm/arm/pmap-v6.c Sat Nov 12 17:03:21 2016 (r308569)
@@ -2739,21 +2739,15 @@ 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
More information about the svn-src-all
mailing list