Changeset View
Changeset View
Standalone View
Standalone View
head/sys/arm64/arm64/pmap.c
Show First 20 Lines • Show All 4,882 Lines • ▼ Show 20 Lines | if ((oldl2 & ATTR_DESCR_MASK) == L2_BLOCK) { | ||||
* The 2MB page mapping was destroyed. | * The 2MB page mapping was destroyed. | ||||
*/ | */ | ||||
continue; | continue; | ||||
} | } | ||||
/* | /* | ||||
* Unless the page mappings are wired, remove the | * Unless the page mappings are wired, remove the | ||||
* mapping to a single page so that a subsequent | * mapping to a single page so that a subsequent | ||||
* access may repromote. Since the underlying page | * access may repromote. Choosing the last page | ||||
* table page is fully populated, this removal never | * within the address range [sva, min(va_next, eva)) | ||||
* frees a page table page. | * generally results in more repromotions. Since the | ||||
* underlying page table page is fully populated, this | |||||
* removal never frees a page table page. | |||||
*/ | */ | ||||
if ((oldl2 & ATTR_SW_WIRED) == 0) { | if ((oldl2 & ATTR_SW_WIRED) == 0) { | ||||
l3 = pmap_l2_to_l3(l2, sva); | va = eva; | ||||
if (va > va_next) | |||||
va = va_next; | |||||
va -= PAGE_SIZE; | |||||
KASSERT(va >= sva, | |||||
("pmap_advise: no address gap")); | |||||
l3 = pmap_l2_to_l3(l2, va); | |||||
KASSERT(pmap_load(l3) != 0, | KASSERT(pmap_load(l3) != 0, | ||||
("pmap_advise: invalid PTE")); | ("pmap_advise: invalid PTE")); | ||||
pmap_remove_l3(pmap, l3, sva, pmap_load(l2), | pmap_remove_l3(pmap, l3, va, pmap_load(l2), | ||||
NULL, &lock); | NULL, &lock); | ||||
} | } | ||||
if (lock != NULL) | if (lock != NULL) | ||||
rw_wunlock(lock); | rw_wunlock(lock); | ||||
} | } | ||||
KASSERT((pmap_load(l2) & ATTR_DESCR_MASK) == L2_TABLE, | KASSERT((pmap_load(l2) & ATTR_DESCR_MASK) == L2_TABLE, | ||||
("pmap_advise: invalid L2 entry after demotion")); | ("pmap_advise: invalid L2 entry after demotion")); | ||||
if (va_next > eva) | if (va_next > eva) | ||||
▲ Show 20 Lines • Show All 1,024 Lines • Show Last 20 Lines |