FreeBSD/sys/arm64/arm64/pmap.c
/*
 * Conditionally create the PV entry for a 4KB page mapping if the required
 * memory can be allocated without resorting to reclamation.
 */
Conditionally create the PV entry for a 4KB page mapping if the required
memory can be allocated without resorting to reclamation.
Conditionally create the PV entry for a 4KB page mapping if the required memory can be allocated without resorting to reclamation .
static boolean_t
pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, vm_page_t m,
    struct rwlock **lockp)
{
	pv_entry_t pv;
	rw_assert(&pvh_global_lock, RA_LOCKED);
	PMAP_LOCK_ASSERT(pmap, MA_OWNED);
	if ((pv = get_pv_entry(pmap, NULL)) != NULL) {
		pv->pv_va = va;
		CHANGE_PV_LIST_LOCK_TO_VM_PAGE(lockp, m);
		TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_next);
		m->md.pv_gen++;
		return (TRUE);
	} else
		return (FALSE);
}
static boolean_t pmap_try_insert_pv_entry ( pmap_t pmap , vm_offset_t va , vm_page_t m , struct rwlock * * lockp ) { pv_entry_t pv ; rw_assert ( & pvh_global_lock , RA_LOCKED ) ; PMAP_LOCK_ASSERT ( pmap , MA_OWNED ) ; if ( ( pv = get_pv_entry ( pmap , NULL ) ) != NULL ) { pv -> pv_va = va ; CHANGE_PV_LIST_LOCK_TO_VM_PAGE ( lockp , m ) ; TAILQ_INSERT_TAIL ( & m -> md . pv_list , pv , pv_next ) ; m -> md . pv_gen ++ ; return ( TRUE ) ; } else return ( FALSE ) ; }
Conditionally create the PV entry for a 4KB page mapping if the required
 memory can be allocated without resorting to reclamation.
Conditionally create the PV entry for a 4KB page mapping if the required memory can be allocated without resorting to reclamation .
/* Pass NULL instead of the lock pointer to disable reclamation. */