FreeBSD/sys/powerpc/aim/mmu_oea64.c
/*
 * Remove the given range of addresses from the specified map.
 */
Remove the given range of addresses from the specified map.
Remove the given range of addresses from the specified map .
void
moea64_remove(mmu_t mmu, pmap_t pm, vm_offset_t sva, vm_offset_t eva)
{
	struct  pvo_entry *pvo, *tpvo, key;
	struct pvo_tree tofree;
	if (pm->pm_stats.resident_count == 0)
		return;
	key.pvo_vaddr = sva;
	RB_INIT(&tofree);
	PMAP_LOCK(pm);
	for (pvo = RB_NFIND(pvo_tree, &pm->pmap_pvo, &key);
	    pvo != NULL && PVO_VADDR(pvo) < eva; pvo = tpvo) {
		tpvo = RB_NEXT(pvo_tree, &pm->pmap_pvo, pvo);
		moea64_pvo_remove_from_pmap(mmu, pvo);
		RB_INSERT(pvo_tree, &tofree, pvo);
	}
	PMAP_UNLOCK(pm);
	RB_FOREACH_SAFE(pvo, pvo_tree, &tofree, tpvo) {
		PV_LOCK(pvo->pvo_pte.pa & LPTE_RPGN);
		moea64_pvo_remove_from_page(mmu, pvo);
		PV_UNLOCK(pvo->pvo_pte.pa & LPTE_RPGN);
		RB_REMOVE(pvo_tree, &tofree, pvo);
		free_pvo_entry(pvo);
	}
}
void moea64_remove ( mmu_t mmu , pmap_t pm , vm_offset_t sva , vm_offset_t eva ) { struct pvo_entry * pvo , * tpvo , key ; struct pvo_tree tofree ; if ( pm -> pm_stats . resident_count == 0 ) return ; key . pvo_vaddr = sva ; RB_INIT ( & tofree ) ; PMAP_LOCK ( pm ) ; for ( pvo = RB_NFIND ( pvo_tree , & pm -> pmap_pvo , & key ) ; pvo != NULL && PVO_VADDR ( pvo ) < eva ; pvo = tpvo ) { tpvo = RB_NEXT ( pvo_tree , & pm -> pmap_pvo , pvo ) ; moea64_pvo_remove_from_pmap ( mmu , pvo ) ; RB_INSERT ( pvo_tree , & tofree , pvo ) ; } PMAP_UNLOCK ( pm ) ; RB_FOREACH_SAFE ( pvo , pvo_tree , & tofree , tpvo ) { PV_LOCK ( pvo -> pvo_pte . pa & LPTE_RPGN ) ; moea64_pvo_remove_from_page ( mmu , pvo ) ; PV_UNLOCK ( pvo -> pvo_pte . pa & LPTE_RPGN ) ; RB_REMOVE ( pvo_tree , & tofree , pvo ) ; free_pvo_entry ( pvo ) ; } }
Remove the given range of addresses from the specified map.
Remove the given range of addresses from the specified map .
/*
	 * Perform an unsynchronized read.  This is, however, safe.
	 */ /*
		 * For locking reasons, remove this from the page table and
		 * pmap, but save delinking from the vm_page for a second
		 * pass
		 */