FreeBSD/sys/arm/arm/pmap-v6.c
/*
 *	pmap_pvh_wired_mappings:
 *
 *	Return the updated number "count" of managed mappings that are wired.
 */
Return the updated number "count" of managed mappings that are wired.
Return the updated number " count " of managed mappings that are wired .
static int
pmap_pvh_wired_mappings(struct md_page *pvh, int count)
{
	pmap_t pmap;
	pt1_entry_t pte1;
	pt2_entry_t pte2;
	pv_entry_t pv;
	rw_assert(&pvh_global_lock, RA_WLOCKED);
	sched_pin();
	TAILQ_FOREACH(pv, &pvh->pv_list, pv_next) {
		pmap = PV_PMAP(pv);
		PMAP_LOCK(pmap);
		pte1 = pte1_load(pmap_pte1(pmap, pv->pv_va));
		if (pte1_is_section(pte1)) {
			if (pte1_is_wired(pte1))
				count++;
		} else {
			KASSERT(pte1_is_link(pte1),
			    ("%s: pte1 %#x is not link", __func__, pte1));
			pte2 = pte2_load(pmap_pte2_quick(pmap, pv->pv_va));
			if (pte2_is_wired(pte2))
				count++;
		}
		PMAP_UNLOCK(pmap);
	}
	sched_unpin();
	return (count);
}
static int pmap_pvh_wired_mappings ( struct md_page * pvh , int count ) { pmap_t pmap ; pt1_entry_t pte1 ; pt2_entry_t pte2 ; pv_entry_t pv ; rw_assert ( & pvh_global_lock , RA_WLOCKED ) ; sched_pin ( ) ; TAILQ_FOREACH ( pv , & pvh -> pv_list , pv_next ) { pmap = PV_PMAP ( pv ) ; PMAP_LOCK ( pmap ) ; pte1 = pte1_load ( pmap_pte1 ( pmap , pv -> pv_va ) ) ; if ( pte1_is_section ( pte1 ) ) { if ( pte1_is_wired ( pte1 ) ) count ++ ; } else { KASSERT ( pte1_is_link ( pte1 ) , ( " " , __func__ , pte1 ) ) ; pte2 = pte2_load ( pmap_pte2_quick ( pmap , pv -> pv_va ) ) ; if ( pte2_is_wired ( pte2 ) ) count ++ ; } PMAP_UNLOCK ( pmap ) ; } sched_unpin ( ) ; return ( count ) ; }
pmap_pvh_wired_mappings:
      Return the updated number "count" of managed mappings that are wired.
pmap_pvh_wired_mappings : Return the updated number " count " of managed mappings that are wired .