Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/arm64/pmap.c
Show First 20 Lines • Show All 3,633 Lines • ▼ Show 20 Lines | |||||
static void | static void | ||||
pmap_update_entry(pmap_t pmap, pd_entry_t *pte, pd_entry_t newpte, | pmap_update_entry(pmap_t pmap, pd_entry_t *pte, pd_entry_t newpte, | ||||
vm_offset_t va, vm_size_t size) | vm_offset_t va, vm_size_t size) | ||||
{ | { | ||||
register_t intr; | register_t intr; | ||||
PMAP_LOCK_ASSERT(pmap, MA_OWNED); | PMAP_LOCK_ASSERT(pmap, MA_OWNED); | ||||
#ifdef INVARIANTS | |||||
for (int i = 0; i < MAXCPU && pcpu_allocations[i] != 0; i++) { | |||||
if (va < pcpu_allocations[i]) { | |||||
KASSERT(va + size < pcpu_allocations[i], | |||||
("%s: Updating start of pcpu: %lx-%lx %lx", | |||||
__func__, va, va + size, pcpu_allocations[i])); | |||||
} else { | |||||
KASSERT(va >= pcpu_allocations[i] + L2_SIZE, | |||||
("%s: Updating end of pcpu: %lx-%lx %lx", __func__, | |||||
va, va+size, pcpu_allocations[i] + L2_SIZE)); | |||||
} | |||||
} | |||||
#endif | |||||
/* | /* | ||||
* Ensure we don't get switched out with the page table in an | * Ensure we don't get switched out with the page table in an | ||||
* inconsistent state. We also need to ensure no interrupts fire | * inconsistent state. We also need to ensure no interrupts fire | ||||
* as they may make use of an address we are about to invalidate. | * as they may make use of an address we are about to invalidate. | ||||
*/ | */ | ||||
intr = intr_disable(); | intr = intr_disable(); | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 3,745 Lines • Show Last 20 Lines |