FreeBSD/sys/powerpc/aim/mmu_oea64.c
/*
 * Remove physical page from all pmaps in which it resides. moea64_pvo_remove()
 * will reflect changes in pte's back to the vm_page.
 */
Remove physical page from all pmaps in which it resides. moea64_pvo_remove()
will reflect changes in pte's back to the vm_page.
Remove physical page from all pmaps in which it resides . moea64_pvo_remove () will reflect changes in pte ' s back to the vm_page .
void
moea64_remove_all(mmu_t mmu, vm_page_t m)
{
	struct	pvo_entry *pvo, *next_pvo;
	struct	pvo_head freequeue;
	int	wasdead;
	pmap_t	pmap;
	LIST_INIT(&freequeue);
	PV_PAGE_LOCK(m);
	LIST_FOREACH_SAFE(pvo, vm_page_to_pvoh(m), pvo_vlink, next_pvo) {
		pmap = pvo->pvo_pmap;
		PMAP_LOCK(pmap);
		wasdead = (pvo->pvo_vaddr & PVO_DEAD);
		if (!wasdead)
			moea64_pvo_remove_from_pmap(mmu, pvo);
		moea64_pvo_remove_from_page(mmu, pvo);
		if (!wasdead)
			LIST_INSERT_HEAD(&freequeue, pvo, pvo_vlink);
		PMAP_UNLOCK(pmap);
	}
	KASSERT(!pmap_page_is_mapped(m), ("Page still has mappings"));
	KASSERT(!(m->aflags & PGA_WRITEABLE), ("Page still writable"));
	PV_PAGE_UNLOCK(m);
	LIST_FOREACH_SAFE(pvo, &freequeue, pvo_vlink, next_pvo)
		free_pvo_entry(pvo);
}
void moea64_remove_all ( mmu_t mmu , vm_page_t m ) { struct pvo_entry * pvo , * next_pvo ; struct pvo_head freequeue ; int wasdead ; pmap_t pmap ; LIST_INIT ( & freequeue ) ; PV_PAGE_LOCK ( m ) ; LIST_FOREACH_SAFE ( pvo , vm_page_to_pvoh ( m ) , pvo_vlink , next_pvo ) { pmap = pvo -> pvo_pmap ; PMAP_LOCK ( pmap ) ; wasdead = ( pvo -> pvo_vaddr & PVO_DEAD ) ; if ( ! wasdead ) moea64_pvo_remove_from_pmap ( mmu , pvo ) ; moea64_pvo_remove_from_page ( mmu , pvo ) ; if ( ! wasdead ) LIST_INSERT_HEAD ( & freequeue , pvo , pvo_vlink ) ; PMAP_UNLOCK ( pmap ) ; } KASSERT ( ! pmap_page_is_mapped ( m ) , ( " " ) ) ; KASSERT ( ! ( m -> aflags & PGA_WRITEABLE ) , ( " " ) ) ; PV_PAGE_UNLOCK ( m ) ; LIST_FOREACH_SAFE ( pvo , & freequeue , pvo_vlink , next_pvo ) free_pvo_entry ( pvo ) ; }
Remove physical page from all pmaps in which it resides.
Remove physical page from all pmaps in which it resides .
/* Clean up UMA allocations */