* Release any resources held by the given physical map. * Called when a pmap initialized by pmap_pinit is being released. * Should only be called if the map contains no valid mappings. */
| 1272 | * Should only be called if the map contains no valid mappings. |
| 1273 | */ |
| 1274 | void |
| 1275 | pmap_release(pmap_t pmap) |
| 1276 | { |
| 1277 | vm_offset_t ptdva; |
| 1278 | vm_page_t ptdpg; |
| 1279 | |
| 1280 | KASSERT(pmap->pm_stats.resident_count == 0, |
| 1281 | ("pmap_release: pmap resident count %ld != 0", |
| 1282 | pmap->pm_stats.resident_count)); |
| 1283 | |
| 1284 | ptdva = (vm_offset_t)pmap->pm_segtab; |
| 1285 | ptdpg = PHYS_TO_VM_PAGE(MIPS_DIRECT_TO_PHYS(ptdva)); |
| 1286 | |
| 1287 | vm_page_unwire_noq(ptdpg); |
| 1288 | vm_page_free_zero(ptdpg); |
| 1289 | } |
| 1290 | |
| 1291 | /* |
| 1292 | * grow the number of kernel page table entries, if needed |
no test coverage detected