Lines Matching refs:walk
32 struct vmemmap_remap_walk *walk);
93 struct vmemmap_remap_walk *walk) in vmemmap_pte_range() argument
101 if (!walk->reuse_page) { in vmemmap_pte_range()
102 walk->reuse_page = pte_page(ptep_get(pte)); in vmemmap_pte_range()
109 walk->nr_walked++; in vmemmap_pte_range()
113 walk->remap_pte(pte, addr, walk); in vmemmap_pte_range()
114 walk->nr_walked++; in vmemmap_pte_range()
120 struct vmemmap_remap_walk *walk) in vmemmap_pmd_range() argument
134 vmemmap_pte_range(pmd, addr, next, walk); in vmemmap_pmd_range()
142 struct vmemmap_remap_walk *walk) in vmemmap_pud_range() argument
152 ret = vmemmap_pmd_range(pud, addr, next, walk); in vmemmap_pud_range()
162 struct vmemmap_remap_walk *walk) in vmemmap_p4d_range() argument
172 ret = vmemmap_pud_range(p4d, addr, next, walk); in vmemmap_p4d_range()
181 struct vmemmap_remap_walk *walk) in vmemmap_remap_range() argument
195 ret = vmemmap_p4d_range(pgd, addr, next, walk); in vmemmap_remap_range()
229 struct vmemmap_remap_walk *walk) in vmemmap_remap_pte() argument
240 if (unlikely(addr == walk->reuse_addr)) { in vmemmap_remap_pte()
242 list_del(&walk->reuse_page->lru); in vmemmap_remap_pte()
252 entry = mk_pte(walk->reuse_page, pgprot); in vmemmap_remap_pte()
253 list_add_tail(&page->lru, walk->vmemmap_pages); in vmemmap_remap_pte()
277 struct vmemmap_remap_walk *walk) in vmemmap_restore_pte() argument
283 BUG_ON(pte_page(ptep_get(pte)) != walk->reuse_page); in vmemmap_restore_pte()
285 page = list_first_entry(walk->vmemmap_pages, struct page, lru); in vmemmap_restore_pte()
288 copy_page(to, (void *)walk->reuse_addr); in vmemmap_restore_pte()
316 struct vmemmap_remap_walk walk = { in vmemmap_remap_free() local
333 walk.reuse_page = alloc_pages_node(nid, gfp_mask, 0); in vmemmap_remap_free()
334 if (walk.reuse_page) { in vmemmap_remap_free()
335 copy_page(page_to_virt(walk.reuse_page), in vmemmap_remap_free()
336 (void *)walk.reuse_addr); in vmemmap_remap_free()
337 list_add(&walk.reuse_page->lru, &vmemmap_pages); in vmemmap_remap_free()
356 ret = vmemmap_remap_range(reuse, end, &walk); in vmemmap_remap_free()
357 if (ret && walk.nr_walked) { in vmemmap_remap_free()
358 end = reuse + walk.nr_walked * PAGE_SIZE; in vmemmap_remap_free()
365 walk = (struct vmemmap_remap_walk) { in vmemmap_remap_free()
371 vmemmap_remap_range(reuse, end, &walk); in vmemmap_remap_free()
418 struct vmemmap_remap_walk walk = { in vmemmap_remap_alloc() local
431 vmemmap_remap_range(reuse, end, &walk); in vmemmap_remap_alloc()