o Lock page queue accesses by vm_page_wire().

This commit is contained in:
Alan Cox 2002-07-14 20:40:32 +00:00
parent 700399bc41
commit 613f5495ed
4 changed files with 8 additions and 0 deletions

View File

@ -423,7 +423,9 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem,
m = vm_page_grab(mem->am_obj, OFF_TO_IDX(i),
VM_ALLOC_ZERO | VM_ALLOC_RETRY);
AGP_DPF("found page pa=%#x\n", VM_PAGE_TO_PHYS(m));
vm_page_lock_queues();
vm_page_wire(m);
vm_page_unlock_queues();
/*
* Install entries in the GATT, making sure that if

View File

@ -371,9 +371,11 @@ agp_i810_alloc_memory(device_t dev, int type, vm_size_t size)
*/
vm_page_t m;
m = vm_page_grab(mem->am_obj, 0, VM_ALLOC_ZERO|VM_ALLOC_RETRY);
vm_page_lock_queues();
vm_page_wire(m);
mem->am_physical = VM_PAGE_TO_PHYS(m);
vm_page_wakeup(m);
vm_page_unlock_queues();
} else {
mem->am_physical = 0;
}

View File

@ -423,7 +423,9 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem,
m = vm_page_grab(mem->am_obj, OFF_TO_IDX(i),
VM_ALLOC_ZERO | VM_ALLOC_RETRY);
AGP_DPF("found page pa=%#x\n", VM_PAGE_TO_PHYS(m));
vm_page_lock_queues();
vm_page_wire(m);
vm_page_unlock_queues();
/*
* Install entries in the GATT, making sure that if

View File

@ -371,9 +371,11 @@ agp_i810_alloc_memory(device_t dev, int type, vm_size_t size)
*/
vm_page_t m;
m = vm_page_grab(mem->am_obj, 0, VM_ALLOC_ZERO|VM_ALLOC_RETRY);
vm_page_lock_queues();
vm_page_wire(m);
mem->am_physical = VM_PAGE_TO_PHYS(m);
vm_page_wakeup(m);
vm_page_unlock_queues();
} else {
mem->am_physical = 0;
}