From b385b395092eb91e9f4e0dcdbb1e81f5576b6307 Mon Sep 17 00:00:00 2001 From: alc Date: Sun, 14 Jul 2002 20:40:32 +0000 Subject: [PATCH] o Lock page queue accesses by vm_page_wire(). --- sys/dev/agp/agp.c | 2 ++ sys/dev/agp/agp_i810.c | 2 ++ sys/pci/agp.c | 2 ++ sys/pci/agp_i810.c | 2 ++ 4 files changed, 8 insertions(+) diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c index ab488fb3a9c2..1726b4b9880a 100644 --- a/sys/dev/agp/agp.c +++ b/sys/dev/agp/agp.c @@ -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 diff --git a/sys/dev/agp/agp_i810.c b/sys/dev/agp/agp_i810.c index 9f1b2924fb0f..f6b7cc2ee179 100644 --- a/sys/dev/agp/agp_i810.c +++ b/sys/dev/agp/agp_i810.c @@ -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; } diff --git a/sys/pci/agp.c b/sys/pci/agp.c index ab488fb3a9c2..1726b4b9880a 100644 --- a/sys/pci/agp.c +++ b/sys/pci/agp.c @@ -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 diff --git a/sys/pci/agp_i810.c b/sys/pci/agp_i810.c index 9f1b2924fb0f..f6b7cc2ee179 100644 --- a/sys/pci/agp_i810.c +++ b/sys/pci/agp_i810.c @@ -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; }