Lines Matching +full:software +full:- +full:locked

5  * This software is available to you under a choice of one of two
15 * - Redistributions of source code must retain the above
19 * - Redistributions in binary form must reproduce the above
24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
30 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31 * SOFTWARE.
47 * qib_map_page - a safety wrapper around pci_map_page()
63 phys = dma_map_page(&hwdev->dev, page, 0, PAGE_SIZE, DMA_FROM_DEVICE); in qib_map_page()
64 if (dma_mapping_error(&hwdev->dev, phys)) in qib_map_page()
65 return -ENOMEM; in qib_map_page()
68 dma_unmap_page(&hwdev->dev, phys, PAGE_SIZE, DMA_FROM_DEVICE); in qib_map_page()
69 phys = dma_map_page(&hwdev->dev, page, 0, PAGE_SIZE, in qib_map_page()
71 if (dma_mapping_error(&hwdev->dev, phys)) in qib_map_page()
72 return -ENOMEM; in qib_map_page()
83 * qib_get_user_pages - lock user pages into memory
97 unsigned long locked, lock_limit; in qib_get_user_pages() local
102 locked = atomic64_add_return(num_pages, &current->mm->pinned_vm); in qib_get_user_pages()
104 if (locked > lock_limit && !capable(CAP_IPC_LOCK)) { in qib_get_user_pages()
105 ret = -ENOMEM; in qib_get_user_pages()
109 mmap_read_lock(current->mm); in qib_get_user_pages()
112 num_pages - got, in qib_get_user_pages()
116 mmap_read_unlock(current->mm); in qib_get_user_pages()
120 mmap_read_unlock(current->mm); in qib_get_user_pages()
126 atomic64_sub(num_pages, &current->mm->pinned_vm); in qib_get_user_pages()
135 if (current->mm) in qib_release_user_pages()
136 atomic64_sub(num_pages, &current->mm->pinned_vm); in qib_release_user_pages()