Lines Matching refs:image

112 static void free_transition_pgtable(struct kimage *image)  in free_transition_pgtable()  argument
114 free_page((unsigned long)image->arch.p4d); in free_transition_pgtable()
115 image->arch.p4d = NULL; in free_transition_pgtable()
116 free_page((unsigned long)image->arch.pud); in free_transition_pgtable()
117 image->arch.pud = NULL; in free_transition_pgtable()
118 free_page((unsigned long)image->arch.pmd); in free_transition_pgtable()
119 image->arch.pmd = NULL; in free_transition_pgtable()
120 free_page((unsigned long)image->arch.pte); in free_transition_pgtable()
121 image->arch.pte = NULL; in free_transition_pgtable()
124 static int init_transition_pgtable(struct kimage *image, pgd_t *pgd) in init_transition_pgtable() argument
135 paddr = __pa(page_address(image->control_code_page)+PAGE_SIZE); in init_transition_pgtable()
141 image->arch.p4d = p4d; in init_transition_pgtable()
149 image->arch.pud = pud; in init_transition_pgtable()
157 image->arch.pmd = pmd; in init_transition_pgtable()
165 image->arch.pte = pte; in init_transition_pgtable()
181 struct kimage *image = (struct kimage *)data; in alloc_pgt_page() local
185 page = kimage_alloc_control_pages(image, 0); in alloc_pgt_page()
194 static int init_pgtable(struct kimage *image, unsigned long start_pgtable) in init_pgtable() argument
198 .context = image, in init_pgtable()
234 for (i = 0; i < image->nr_segments; i++) { in init_pgtable()
235 mstart = image->segment[i].mem; in init_pgtable()
236 mend = mstart + image->segment[i].memsz; in init_pgtable()
257 return init_transition_pgtable(image, level4p); in init_pgtable()
272 int machine_kexec_prepare(struct kimage *image) in machine_kexec_prepare() argument
278 start_pgtable = page_to_pfn(image->control_code_page) << PAGE_SHIFT; in machine_kexec_prepare()
281 result = init_pgtable(image, start_pgtable); in machine_kexec_prepare()
288 void machine_kexec_cleanup(struct kimage *image) in machine_kexec_cleanup() argument
290 free_transition_pgtable(image); in machine_kexec_cleanup()
297 void machine_kexec(struct kimage *image) in machine_kexec() argument
304 if (image->preserve_context) in machine_kexec()
314 if (image->preserve_context) { in machine_kexec()
327 control_page = page_address(image->control_code_page) + PAGE_SIZE; in machine_kexec()
333 (unsigned long)__pa(page_address(image->control_code_page)); in machine_kexec()
335 if (image->type == KEXEC_TYPE_DEFAULT) in machine_kexec()
336 page_list[PA_SWAP_PAGE] = (page_to_pfn(image->swap_page) in machine_kexec()
358 image->start = relocate_kernel((unsigned long)image->head, in machine_kexec()
360 image->start, in machine_kexec()
361 image->preserve_context, in machine_kexec()
365 if (image->preserve_context) in machine_kexec()
375 void *arch_kexec_kernel_image_load(struct kimage *image) in arch_kexec_kernel_image_load() argument
377 vfree(image->elf_headers); in arch_kexec_kernel_image_load()
378 image->elf_headers = NULL; in arch_kexec_kernel_image_load()
380 if (!image->fops || !image->fops->load) in arch_kexec_kernel_image_load()
383 return image->fops->load(image, image->kernel_buf, in arch_kexec_kernel_image_load()
384 image->kernel_buf_len, image->initrd_buf, in arch_kexec_kernel_image_load()
385 image->initrd_buf_len, image->cmdline_buf, in arch_kexec_kernel_image_load()
386 image->cmdline_buf_len); in arch_kexec_kernel_image_load()