* Add a list of wired pages to the kva * this routine is only used for temporary * kernel mappings that do not need to have * page modification or references recorded. * Note that old mappings are simply written * over. The page *must* be wired. * Note: SMP coherent. Uses a ranged shootdown IPI. */
| 1801 | * Note: SMP coherent. Uses a ranged shootdown IPI. |
| 1802 | */ |
| 1803 | void |
| 1804 | pmap_qenter(vm_offset_t sva, vm_page_t *ma, int count) |
| 1805 | { |
| 1806 | u_int anychanged; |
| 1807 | pt2_entry_t *epte2p, *pte2p, pte2; |
| 1808 | vm_page_t m; |
| 1809 | vm_paddr_t pa; |
| 1810 | |
| 1811 | anychanged = 0; |
| 1812 | pte2p = pt2map_entry(sva); |
| 1813 | epte2p = pte2p + count; |
| 1814 | while (pte2p < epte2p) { |
| 1815 | m = *ma++; |
| 1816 | pa = VM_PAGE_TO_PHYS(m); |
| 1817 | pte2 = pte2_load(pte2p); |
| 1818 | if ((pte2_pa(pte2) != pa) || |
| 1819 | (pte2_attr(pte2) != vm_page_pte2_attr(m))) { |
| 1820 | anychanged++; |
| 1821 | pte2_store(pte2p, PTE2_KERN(pa, PTE2_AP_KRW, |
| 1822 | vm_page_pte2_attr(m))); |
| 1823 | } |
| 1824 | pte2p++; |
| 1825 | } |
| 1826 | if (__predict_false(anychanged)) |
| 1827 | tlb_flush_range(sva, count * PAGE_SIZE); |
| 1828 | } |
| 1829 | |
| 1830 | /* |
| 1831 | * This routine tears out page mappings from the |
no test coverage detected