Deleted Added
full compact
device_pager.c (248084) device_pager.c (254141)
1/*-
2 * Copyright (c) 1990 University of Utah.
3 * Copyright (c) 1991, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * the Systems Programming Group of the University of Utah Computer
8 * Science Department.

--- 21 unchanged lines hidden (view full) ---

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)device_pager.c 8.1 (Berkeley) 6/11/93
35 */
36
37#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1990 University of Utah.
3 * Copyright (c) 1991, 1993
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * the Systems Programming Group of the University of Utah Computer
8 * Science Department.

--- 21 unchanged lines hidden (view full) ---

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)device_pager.c 8.1 (Berkeley) 6/11/93
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/sys/vm/device_pager.c 248084 2013-03-09 02:32:23Z attilio $");
38__FBSDID("$FreeBSD: head/sys/vm/device_pager.c 254141 2013-08-09 11:28:55Z attilio $");
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/conf.h>
43#include <sys/lock.h>
44#include <sys/proc.h>
45#include <sys/mutex.h>
46#include <sys/mman.h>

--- 296 unchanged lines hidden (view full) ---

343 vm_page_updatefake(page, paddr, memattr);
344 } else {
345 /*
346 * Replace the passed in reqpage page with our own fake page and
347 * free up the all of the original pages.
348 */
349 page = vm_page_getfake(paddr, memattr);
350 VM_OBJECT_WLOCK(object);
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/conf.h>
43#include <sys/lock.h>
44#include <sys/proc.h>
45#include <sys/mutex.h>
46#include <sys/mman.h>

--- 296 unchanged lines hidden (view full) ---

343 vm_page_updatefake(page, paddr, memattr);
344 } else {
345 /*
346 * Replace the passed in reqpage page with our own fake page and
347 * free up the all of the original pages.
348 */
349 page = vm_page_getfake(paddr, memattr);
350 VM_OBJECT_WLOCK(object);
351 if (vm_page_replace(page, object, (*mres)->pindex) != *mres)
352 panic("old_dev_pager_fault: invalid page replacement");
351 vm_page_lock(*mres);
352 vm_page_free(*mres);
353 vm_page_unlock(*mres);
354 *mres = page;
353 vm_page_lock(*mres);
354 vm_page_free(*mres);
355 vm_page_unlock(*mres);
356 *mres = page;
355 vm_page_insert(page, object, pidx);
356 }
357 page->valid = VM_PAGE_BITS_ALL;
358 return (VM_PAGER_OK);
359}
360
361static void
362dev_pager_putpages(object, m, count, sync, rtvals)
363 vm_object_t object;

--- 69 unchanged lines hidden ---
357 }
358 page->valid = VM_PAGE_BITS_ALL;
359 return (VM_PAGER_OK);
360}
361
362static void
363dev_pager_putpages(object, m, count, sync, rtvals)
364 vm_object_t object;

--- 69 unchanged lines hidden ---