Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\kexec_core.c Create Date:2022-07-28 11:02:54
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:kimage_alloc_page

Proto:static struct page *kimage_alloc_page(struct kimage *image, gfp_t gfp_mask, unsigned long destination)

Type:struct page

Parameter:

TypeParameterName
struct kimage *image
gfp_tgfp_mask
unsigned longdestination
708  addr = page_to_boot_pfn(page) << PAGE_SHIFT determines the page size
709  If addr == destination Then
710  deletes entry from list
711  Return page
714  page = NULL
715  When 1 cycle
719  page = kimage_alloc_pages(gfp_mask, 0)
720  If Not page Then Return NULL
726  Continue
728  addr = page_to_boot_pfn(page) << PAGE_SHIFT determines the page size
731  If addr == destination Then Break
735  If Not kimage_is_destination_range(image, addr, addr + PAGE_SIZE) Then Break
744  old = kimage_dst_used(image, addr)
745  If old Then
750  old_addr = old & PAGE_MASK
753  old = addr | old & ~PAGE_MASK
759  If Not (gfp_mask & __GFP_HIGHMEM) && PageHighMem(old_page) Then
762  Continue
764  addr = old_addr
765  page = old_page
766  Break
769  list_add - add a new entry*@new: new entry to be added*@head: list head to add it after* Insert a new entry after the specified head.* This is good for implementing stacks.
772  Return page
Caller
NameDescribe
kimage_add_entry
kimage_load_normal_segment