* Create the PV entry for a 2MB page mapping. Always returns true unless the * flag PMAP_ENTER_NORECLAIM is specified. If that flag is specified, returns * false if the PV entry cannot be allocated without resorting to reclamation. */
| 5560 | * false if the PV entry cannot be allocated without resorting to reclamation. |
| 5561 | */ |
| 5562 | static bool |
| 5563 | pmap_pv_insert_pde(pmap_t pmap, vm_offset_t va, pd_entry_t pde, u_int flags, |
| 5564 | struct rwlock **lockp) |
| 5565 | { |
| 5566 | struct md_page *pvh; |
| 5567 | pv_entry_t pv; |
| 5568 | vm_paddr_t pa; |
| 5569 | |
| 5570 | PMAP_LOCK_ASSERT(pmap, MA_OWNED); |
| 5571 | /* Pass NULL instead of the lock pointer to disable reclamation. */ |
| 5572 | if ((pv = get_pv_entry(pmap, (flags & PMAP_ENTER_NORECLAIM) != 0 ? |
| 5573 | NULL : lockp)) == NULL) |
| 5574 | return (false); |
| 5575 | pv->pv_va = va; |
| 5576 | pa = pde & PG_PS_FRAME; |
| 5577 | CHANGE_PV_LIST_LOCK_TO_PHYS(lockp, pa); |
| 5578 | pvh = pa_to_pvh(pa); |
| 5579 | TAILQ_INSERT_TAIL(&pvh->pv_list, pv, pv_next); |
| 5580 | pvh->pv_gen++; |
| 5581 | return (true); |
| 5582 | } |
| 5583 | |
| 5584 | /* |
| 5585 | * Fills a page table page with mappings to consecutive physical pages. |
no test coverage detected