| 1598 | } |
| 1599 | |
| 1600 | static void |
| 1601 | free_pv_chunk(struct pv_chunk *pc) |
| 1602 | { |
| 1603 | vm_page_t m; |
| 1604 | |
| 1605 | TAILQ_REMOVE(&pv_chunks, pc, pc_lru); |
| 1606 | PV_STAT(pv_entry_spare -= _NPCPV); |
| 1607 | PV_STAT(pc_chunk_count--); |
| 1608 | PV_STAT(pc_chunk_frees++); |
| 1609 | /* entire chunk is free, return it */ |
| 1610 | m = PHYS_TO_VM_PAGE(MIPS_DIRECT_TO_PHYS((vm_offset_t)pc)); |
| 1611 | dump_drop_page(m->phys_addr); |
| 1612 | vm_page_unwire_noq(m); |
| 1613 | vm_page_free(m); |
| 1614 | } |
| 1615 | |
| 1616 | /* |
| 1617 | * get a new pv_entry, allocating a block from the system |
no test coverage detected