FreeBSD/sys/arm/arm/pmap-v4.c
/*
 * Free an L1 translation table.
 * This is called at pmap destruction time.
 */
Free an L1 translation table.
This is called at pmap destruction time.
Free an L1 translation table . This is called at pmap destruction time .
static void
pmap_free_l1(pmap_t pm)
{
	struct l1_ttable *l1 = pm->pm_l1;
	mtx_lock(&l1_lru_lock);
	if (l1->l1_domain_use_count < PMAP_DOMAINS)
		TAILQ_REMOVE(&l1_lru_list, l1, l1_lru);
	l1->l1_domain_free[pm->pm_domain - 1] = l1->l1_domain_first;
	l1->l1_domain_first = pm->pm_domain - 1;
	l1->l1_domain_use_count--;
	if (l1->l1_domain_use_count == 0) {
		TAILQ_INSERT_HEAD(&l1_lru_list, l1, l1_lru);
	}	else
		TAILQ_INSERT_TAIL(&l1_lru_list, l1, l1_lru);
	mtx_unlock(&l1_lru_lock);
}
static void pmap_free_l1 ( pmap_t pm ) { struct l1_ttable * l1 = pm -> pm_l1 ; mtx_lock ( & l1_lru_lock ) ; if ( l1 -> l1_domain_use_count < PMAP_DOMAINS ) TAILQ_REMOVE ( & l1_lru_list , l1 , l1_lru ) ; l1 -> l1_domain_free [ pm -> pm_domain - 1 ] = l1 -> l1_domain_first ; l1 -> l1_domain_first = pm -> pm_domain - 1 ; l1 -> l1_domain_use_count -- ; if ( l1 -> l1_domain_use_count == 0 ) { TAILQ_INSERT_HEAD ( & l1_lru_list , l1 , l1_lru ) ; } else TAILQ_INSERT_TAIL ( & l1_lru_list , l1 , l1_lru ) ; mtx_unlock ( & l1_lru_lock ) ; }
Free an L1 translation table.
Free an L1 translation table .
/*
	 * If this L1 is currently on the LRU list, remove it.
	 */ /*
	 * Free up the domain number which was allocated to the pmap
	 */ /*
	 * The L1 now must have at least 1 free domain, so add
	 * it back to the LRU list. If the use count is zero,
	 * put it at the head of the list, otherwise it goes
	 * to the tail.
	 */