Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_fault.c
Show First 20 Lines • Show All 1,519 Lines • ▼ Show 20 Lines | vm_fault_quick_hold_pages(vm_map_t map, vm_offset_t addr, vm_size_t len, | ||||
} | } | ||||
if (pmap_failed) { | if (pmap_failed) { | ||||
/* | /* | ||||
* One or more pages could not be held by the pmap. Either no | * One or more pages could not be held by the pmap. Either no | ||||
* page was mapped at the specified virtual address or that | * page was mapped at the specified virtual address or that | ||||
* mapping had insufficient permissions. Attempt to fault in | * mapping had insufficient permissions. Attempt to fault in | ||||
* and hold these pages. | * and hold these pages. | ||||
*/ | */ | ||||
if ((prot & VM_PROT_QUICK_NOFAULT) != 0 && | |||||
(curthread->td_pflags & TDP_NOFAULTING) != 0) | |||||
goto error; | |||||
for (mp = ma, va = addr; va < end; mp++, va += PAGE_SIZE) | for (mp = ma, va = addr; va < end; mp++, va += PAGE_SIZE) | ||||
if (*mp == NULL && vm_fault_hold(map, va, prot, | if (*mp == NULL && vm_fault_hold(map, va, prot, | ||||
VM_FAULT_NORMAL, mp) != KERN_SUCCESS) | VM_FAULT_NORMAL, mp) != KERN_SUCCESS) | ||||
goto error; | goto error; | ||||
} | } | ||||
return (count); | return (count); | ||||
error: | error: | ||||
for (mp = ma; mp < ma + count; mp++) | for (mp = ma; mp < ma + count; mp++) | ||||
▲ Show 20 Lines • Show All 227 Lines • Show Last 20 Lines |