Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_fault.c
Show First 20 Lines • Show All 1,707 Lines • ▼ Show 20 Lines | vm_fault_quick_hold_pages(vm_map_t map, vm_offset_t addr, vm_size_t len, | ||||
int count; | int count; | ||||
boolean_t pmap_failed; | boolean_t pmap_failed; | ||||
if (len == 0) | if (len == 0) | ||||
return (0); | return (0); | ||||
end = round_page(addr + len); | end = round_page(addr + len); | ||||
addr = trunc_page(addr); | addr = trunc_page(addr); | ||||
/* | if (!vm_map_check_range(map, addr, end)) | ||||
* Check for illegal addresses. | |||||
*/ | |||||
if (addr < vm_map_min(map) || addr > end || end > vm_map_max(map)) | |||||
return (-1); | return (-1); | ||||
if (atop(end - addr) > max_count) | if (atop(end - addr) > max_count) | ||||
panic("vm_fault_quick_hold_pages: count > max_count"); | panic("vm_fault_quick_hold_pages: count > max_count"); | ||||
count = atop(end - addr); | count = atop(end - addr); | ||||
/* | /* | ||||
* Most likely, the physical pages are resident in the pmap, so it is | * Most likely, the physical pages are resident in the pmap, so it is | ||||
▲ Show 20 Lines • Show All 283 Lines • Show Last 20 Lines |