privcmd.c (63e9755548e4feebf798686ab8bce0cdaaaf7b46) privcmd.c (0012f373e43db2341c20329163ed2d5ad3b0f341)
1/*
2 * Copyright (c) 2014 Roger Pau Monné <roger.pau@citrix.com>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

174
175 if (*mres != NULL) {
176 oldm = *mres;
177 vm_page_free(oldm);
178 *mres = NULL;
179 }
180
181 vm_page_busy_acquire(page, 0);
1/*
2 * Copyright (c) 2014 Roger Pau Monné <roger.pau@citrix.com>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

174
175 if (*mres != NULL) {
176 oldm = *mres;
177 vm_page_free(oldm);
178 *mres = NULL;
179 }
180
181 vm_page_busy_acquire(page, 0);
182 vm_page_valid(page);
182 vm_page_insert(page, object, pidx);
183 vm_page_insert(page, object, pidx);
183 page->valid = VM_PAGE_BITS_ALL;
184 *mres = page;
185 return (VM_PAGER_OK);
186}
187
188/*----------------------- Privcmd char device methods ------------------------*/
189static int
190privcmd_mmap_single(struct cdev *cdev, vm_ooffset_t *offset, vm_size_t size,
191 vm_object_t *object, int nprot)

--- 238 unchanged lines hidden ---
184 *mres = page;
185 return (VM_PAGER_OK);
186}
187
188/*----------------------- Privcmd char device methods ------------------------*/
189static int
190privcmd_mmap_single(struct cdev *cdev, vm_ooffset_t *offset, vm_size_t size,
191 vm_object_t *object, int nprot)

--- 238 unchanged lines hidden ---