Changeset View
Changeset View
Standalone View
Standalone View
head/sys/arm/arm/pmap-v6.c
Show First 20 Lines • Show All 2,628 Lines • ▼ Show 20 Lines | #endif | ||||
pte2p = pmap_pt2tab_entry(pmap, va); | pte2p = pmap_pt2tab_entry(pmap, va); | ||||
(void)pt2tab_load_clear(pte2p); | (void)pt2tab_load_clear(pte2p); | ||||
pmap_tlb_flush(pmap, pt2map_pt2pg(va)); | pmap_tlb_flush(pmap, pt2map_pt2pg(va)); | ||||
m->wire_count = 0; | m->wire_count = 0; | ||||
pmap->pm_stats.resident_count--; | pmap->pm_stats.resident_count--; | ||||
/* | /* | ||||
* This is a release store so that the ordinary store unmapping | * This barrier is so that the ordinary store unmapping | ||||
* the L2 page table page is globally performed before TLB shoot- | * the L2 page table page is globally performed before TLB shoot- | ||||
* down is begun. | * down is begun. | ||||
*/ | */ | ||||
atomic_subtract_rel_int(&vm_cnt.v_wire_count, 1); | wmb(); | ||||
vm_wire_sub(1); | |||||
} | } | ||||
/* | /* | ||||
* Decrements a L2 page table page's wire count, which is used to record the | * Decrements a L2 page table page's wire count, which is used to record the | ||||
* number of valid page table entries within the page. If the wire count | * number of valid page table entries within the page. If the wire count | ||||
* drops to zero, then the page table page is unmapped. Returns TRUE if the | * drops to zero, then the page table page is unmapped. Returns TRUE if the | ||||
* page table page was unmapped and FALSE otherwise. | * page table page was unmapped and FALSE otherwise. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 290 Lines • ▼ Show 20 Lines | if (pmap != NULL) { | ||||
if (pmap != locked_pmap) | if (pmap != locked_pmap) | ||||
PMAP_UNLOCK(pmap); | PMAP_UNLOCK(pmap); | ||||
} | } | ||||
if (m_pc == NULL && pv_vafree != 0 && SLIST_EMPTY(&free)) { | if (m_pc == NULL && pv_vafree != 0 && SLIST_EMPTY(&free)) { | ||||
m_pc = SLIST_FIRST(&free); | m_pc = SLIST_FIRST(&free); | ||||
SLIST_REMOVE_HEAD(&free, plinks.s.ss); | SLIST_REMOVE_HEAD(&free, plinks.s.ss); | ||||
/* Recycle a freed page table page. */ | /* Recycle a freed page table page. */ | ||||
m_pc->wire_count = 1; | m_pc->wire_count = 1; | ||||
atomic_add_int(&vm_cnt.v_wire_count, 1); | vm_wire_add(1); | ||||
} | } | ||||
pmap_free_zero_pages(&free); | pmap_free_zero_pages(&free); | ||||
return (m_pc); | return (m_pc); | ||||
} | } | ||||
static void | static void | ||||
free_pv_chunk(struct pv_chunk *pc) | free_pv_chunk(struct pv_chunk *pc) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 3,942 Lines • Show Last 20 Lines |