* Conditionally create a pv entry. */
| 2726 | * Conditionally create a pv entry. |
| 2727 | */ |
| 2728 | static boolean_t |
| 2729 | pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, vm_page_t m) |
| 2730 | { |
| 2731 | pv_entry_t pv; |
| 2732 | |
| 2733 | rw_assert(&pvh_global_lock, RA_WLOCKED); |
| 2734 | PMAP_LOCK_ASSERT(pmap, MA_OWNED); |
| 2735 | if (pv_entry_count < pv_entry_high_water && |
| 2736 | (pv = get_pv_entry(pmap, TRUE)) != NULL) { |
| 2737 | pv->pv_va = va; |
| 2738 | TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_next); |
| 2739 | return (TRUE); |
| 2740 | } else |
| 2741 | return (FALSE); |
| 2742 | } |
| 2743 | |
| 2744 | /* |
| 2745 | * Create the pv entries for each of the pages within a superpage. |
no test coverage detected