Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/netmap/netmap_freebsd.c
Show First 20 Lines • Show All 1,018 Lines • ▼ Show 20 Lines | if (((*mres)->flags & PG_FICTITIOUS) != 0) { | ||||
*/ | */ | ||||
page = *mres; | page = *mres; | ||||
vm_page_updatefake(page, paddr, memattr); | vm_page_updatefake(page, paddr, memattr); | ||||
} else { | } else { | ||||
/* | /* | ||||
* Replace the passed in reqpage page with our own fake page and | * Replace the passed in reqpage page with our own fake page and | ||||
* free up the all of the original pages. | * free up the all of the original pages. | ||||
*/ | */ | ||||
#ifndef VM_OBJECT_WUNLOCK /* FreeBSD < 10.x */ | |||||
#define VM_OBJECT_WUNLOCK VM_OBJECT_UNLOCK | |||||
#define VM_OBJECT_WLOCK VM_OBJECT_LOCK | |||||
#endif /* VM_OBJECT_WUNLOCK */ | |||||
VM_OBJECT_WUNLOCK(object); | VM_OBJECT_WUNLOCK(object); | ||||
page = vm_page_getfake(paddr, memattr); | page = vm_page_getfake(paddr, memattr); | ||||
VM_OBJECT_WLOCK(object); | VM_OBJECT_WLOCK(object); | ||||
vm_page_replace(page, object, (*mres)->pindex, *mres); | vm_page_replace(page, object, (*mres)->pindex, *mres); | ||||
*mres = page; | *mres = page; | ||||
} | } | ||||
page->valid = VM_PAGE_BITS_ALL; | page->valid = VM_PAGE_BITS_ALL; | ||||
return (VM_PAGER_OK); | return (VM_PAGER_OK); | ||||
▲ Show 20 Lines • Show All 560 Lines • Show Last 20 Lines |