Lines Matching refs:page

86 linux_page_address(struct page *page)  in linux_page_address()  argument
89 if (page->object != kernel_object) { in linux_page_address()
91 ((void *)(uintptr_t)PHYS_TO_DMAP(page_to_phys(page))) : in linux_page_address()
95 IDX_TO_OFF(page->pindex))); in linux_page_address()
98 struct page *
101 struct page *page; in linux_alloc_pages() local
110 page = vm_page_alloc_noobj(req); in linux_alloc_pages()
111 if (page == NULL) in linux_alloc_pages()
117 page = vm_page_alloc_noobj_contig(req, npages, 0, pmax, in linux_alloc_pages()
119 if (page == NULL) { in linux_alloc_pages()
140 page = virt_to_page((void *)vaddr); in linux_alloc_pages()
142 KASSERT(vaddr == (vm_offset_t)page_address(page), in linux_alloc_pages()
146 return (page); in linux_alloc_pages()
158 linux_free_pages(struct page *page, unsigned int order) in linux_free_pages() argument
165 vm_page_t pgo = page + x; in linux_free_pages()
173 vaddr = (vm_offset_t)page_address(page); in linux_free_pages()
203 vm_page_t page; in linux_free_kmem() local
205 page = PHYS_TO_VM_PAGE(DMAP_TO_PHYS(addr)); in linux_free_kmem()
206 linux_free_pages(page, order); in linux_free_kmem()
212 int write, struct page **pages) in linux_get_user_pages_internal()
226 struct page **pages) in __get_user_pages_fast()
270 struct page **pages, struct vm_area_struct **vmas) in get_user_pages_remote()
281 unsigned int gup_flags, struct page **pages) in lkpi_get_user_pages()
302 vm_page_t page; in lkpi_vmf_insert_pfn_prot_locked() local
312 page = vm_page_grab(vm_obj, pindex, VM_ALLOC_NOCREAT); in lkpi_vmf_insert_pfn_prot_locked()
313 if (page == NULL) { in lkpi_vmf_insert_pfn_prot_locked()
314 page = PHYS_TO_VM_PAGE(IDX_TO_OFF(pfn)); in lkpi_vmf_insert_pfn_prot_locked()
315 if (!vm_page_busy_acquire(page, VM_ALLOC_WAITFAIL)) in lkpi_vmf_insert_pfn_prot_locked()
317 if (page->object != NULL) { in lkpi_vmf_insert_pfn_prot_locked()
318 tmp_obj = page->object; in lkpi_vmf_insert_pfn_prot_locked()
319 vm_page_xunbusy(page); in lkpi_vmf_insert_pfn_prot_locked()
322 if (page->object == tmp_obj && in lkpi_vmf_insert_pfn_prot_locked()
323 vm_page_busy_acquire(page, VM_ALLOC_WAITFAIL)) { in lkpi_vmf_insert_pfn_prot_locked()
324 KASSERT(page->object == tmp_obj, in lkpi_vmf_insert_pfn_prot_locked()
326 KASSERT((page->oflags & VPO_UNMANAGED) == 0, in lkpi_vmf_insert_pfn_prot_locked()
328 vm_pager_page_unswapped(page); in lkpi_vmf_insert_pfn_prot_locked()
329 if (pmap_page_is_mapped(page)) { in lkpi_vmf_insert_pfn_prot_locked()
330 vm_page_xunbusy(page); in lkpi_vmf_insert_pfn_prot_locked()
337 vm_page_remove(page); in lkpi_vmf_insert_pfn_prot_locked()
343 if (vm_page_insert(page, vm_obj, pindex)) { in lkpi_vmf_insert_pfn_prot_locked()
344 vm_page_xunbusy(page); in lkpi_vmf_insert_pfn_prot_locked()
347 vm_page_valid(page); in lkpi_vmf_insert_pfn_prot_locked()
349 pmap_page_set_memattr(page, pgprot2cachemode(prot)); in lkpi_vmf_insert_pfn_prot_locked()
528 vm_page_t page; in linuxkpi_page_frag_free() local
530 page = virt_to_page(addr); in linuxkpi_page_frag_free()
531 linux_free_pages(page, 0); in linuxkpi_page_frag_free()
535 linuxkpi__page_frag_cache_drain(struct page *page, size_t count __unused) in linuxkpi__page_frag_cache_drain() argument
538 linux_free_pages(page, 0); in linuxkpi__page_frag_cache_drain()