Lines Matching refs:page
105 static struct page *kimage_alloc_page(struct kimage *image,
278 static struct page *kimage_alloc_pages(gfp_t gfp_mask, unsigned int order) in kimage_alloc_pages()
280 struct page *pages; in kimage_alloc_pages()
305 static void kimage_free_pages(struct page *page) in kimage_free_pages() argument
309 order = page_private(page); in kimage_free_pages()
312 arch_kexec_pre_free_pages(page_address(page), count); in kimage_free_pages()
315 ClearPageReserved(page + i); in kimage_free_pages()
316 __free_pages(page, order); in kimage_free_pages()
321 struct page *page, *next; in kimage_free_page_list() local
323 list_for_each_entry_safe(page, next, list, lru) { in kimage_free_page_list()
324 list_del(&page->lru); in kimage_free_page_list()
325 kimage_free_pages(page); in kimage_free_page_list()
329 static struct page *kimage_alloc_normal_control_pages(struct kimage *image, in kimage_alloc_normal_control_pages()
346 struct page *pages; in kimage_alloc_normal_control_pages()
396 static struct page *kimage_alloc_crash_control_pages(struct kimage *image, in kimage_alloc_crash_control_pages()
421 struct page *pages; in kimage_alloc_crash_control_pages()
464 struct page *kimage_alloc_control_pages(struct kimage *image, in kimage_alloc_control_pages()
467 struct page *pages = NULL; in kimage_alloc_control_pages()
490 struct page *page; in kimage_add_entry() local
492 page = kimage_alloc_page(image, GFP_KERNEL, KIMAGE_NO_DEST); in kimage_add_entry()
493 if (!page) in kimage_add_entry()
496 ind_page = page_address(page); in kimage_add_entry()
518 static int kimage_add_page(struct kimage *image, unsigned long page) in kimage_add_page() argument
520 page &= PAGE_MASK; in kimage_add_page()
522 return kimage_add_entry(image, page | IND_SOURCE); in kimage_add_page()
551 struct page *page; in kimage_free_entry() local
553 page = boot_pfn_to_page(entry >> PAGE_SHIFT); in kimage_free_entry()
554 kimage_free_pages(page); in kimage_free_entry()
562 struct page *cma = image->segment_cma[i]; in kimage_free_cma()
627 unsigned long page) in kimage_dst_used() argument
636 if (page == destination) in kimage_dst_used()
645 static struct page *kimage_alloc_page(struct kimage *image, in kimage_alloc_page()
667 struct page *page; in kimage_alloc_page() local
674 list_for_each_entry(page, &image->dest_pages, lru) { in kimage_alloc_page()
675 addr = page_to_boot_pfn(page) << PAGE_SHIFT; in kimage_alloc_page()
677 list_del(&page->lru); in kimage_alloc_page()
678 return page; in kimage_alloc_page()
681 page = NULL; in kimage_alloc_page()
686 page = kimage_alloc_pages(gfp_mask, 0); in kimage_alloc_page()
687 if (!page) in kimage_alloc_page()
690 if (page_to_boot_pfn(page) > in kimage_alloc_page()
692 list_add(&page->lru, &image->unusable_pages); in kimage_alloc_page()
695 addr = page_to_boot_pfn(page) << PAGE_SHIFT; in kimage_alloc_page()
715 struct page *old_page; in kimage_alloc_page()
719 copy_highpage(page, old_page); in kimage_alloc_page()
731 page = old_page; in kimage_alloc_page()
735 list_add(&page->lru, &image->dest_pages); in kimage_alloc_page()
738 return page; in kimage_alloc_page()
744 struct page *cma = image->segment_cma[idx]; in kimage_load_cma_segment()
826 struct page *page; in kimage_load_normal_segment() local
830 page = kimage_alloc_page(image, GFP_HIGHUSER, maddr); in kimage_load_normal_segment()
831 if (!page) { in kimage_load_normal_segment()
835 result = kimage_add_page(image, page_to_boot_pfn(page) in kimage_load_normal_segment()
840 ptr = kmap_local_page(page); in kimage_load_normal_segment()
897 struct page *page; in kimage_load_crash_segment() local
901 page = boot_pfn_to_page(maddr >> PAGE_SHIFT); in kimage_load_crash_segment()
902 if (!page) { in kimage_load_crash_segment()
906 arch_kexec_post_alloc_pages(page_address(page), 1, 0); in kimage_load_crash_segment()
907 ptr = kmap_local_page(page); in kimage_load_crash_segment()
929 kexec_flush_icache_page(page); in kimage_load_crash_segment()
931 arch_kexec_pre_free_pages(page_address(page), 1); in kimage_load_crash_segment()
970 struct page **src_pages; in kimage_map_segment()