MCPcopy Create free account
hub / github.com/F-Stack/f-stack / pmap_qenter

Function pmap_qenter

freebsd/arm/arm/pmap-v6.c:1803–1828  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

1801 * Note: SMP coherent. Uses a ranged shootdown IPI.
1802 */
1803void
1804pmap_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

Callers 3

get_pv_entryFunction · 0.70
tegra_bo_init_pagerFunction · 0.50
sf_buf_mapFunction · 0.50

Calls 7

pt2map_entryFunction · 0.85
pte2_loadFunction · 0.85
pte2_paFunction · 0.85
pte2_attrFunction · 0.85
vm_page_pte2_attrFunction · 0.85
pte2_storeFunction · 0.85
tlb_flush_rangeFunction · 0.85

Tested by

no test coverage detected