Changeset View
Changeset View
Standalone View
Standalone View
sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c
Show First 20 Lines • Show All 468 Lines • ▼ Show 20 Lines | actual_pages = vm_fault_quick_hold_pages(&p->p_vmspace->vm_map, | ||||
(type == PAGELIST_READ ? VM_PROT_WRITE : 0 ) | VM_PROT_READ, pages, num_pages); | (type == PAGELIST_READ ? VM_PROT_WRITE : 0 ) | VM_PROT_READ, pages, num_pages); | ||||
if (actual_pages != num_pages) { | if (actual_pages != num_pages) { | ||||
vm_page_unhold_pages(pages, actual_pages); | vm_page_unhold_pages(pages, actual_pages); | ||||
free(pagelist, M_VCPAGELIST); | free(pagelist, M_VCPAGELIST); | ||||
return (-ENOMEM); | return (-ENOMEM); | ||||
} | } | ||||
for (i = 0; i < actual_pages; i++) { | |||||
vm_page_lock(pages[i]); | |||||
vm_page_wire(pages[i]); | |||||
vm_page_unhold(pages[i]); | |||||
vm_page_unlock(pages[i]); | |||||
} | |||||
pagelist->length = count; | pagelist->length = count; | ||||
pagelist->type = type; | pagelist->type = type; | ||||
pagelist->offset = offset; | pagelist->offset = offset; | ||||
/* Group the pages into runs of contiguous pages */ | /* Group the pages into runs of contiguous pages */ | ||||
base_addr = (void *)PHYS_TO_VCBUS(VM_PAGE_TO_PHYS(pages[0])); | base_addr = (void *)PHYS_TO_VCBUS(VM_PAGE_TO_PHYS(pages[0])); | ||||
next_addr = base_addr + PAGE_SIZE; | next_addr = base_addr + PAGE_SIZE; | ||||
▲ Show 20 Lines • Show All 128 Lines • Show Last 20 Lines |