Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\snapshot.c Create Date:2022-07-28 10:00:15
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:get_image_page - Allocate a page for a hibernation image

Proto:static void *get_image_page(gfp_t gfp_mask, int safe_needed)

Type:void

Parameter:

TypeParameterName
gfp_tgfp_mask
intsafe_needed
160  res = get_zeroed_page(gfp_mask)
161  If safe_needed Then When res && swsusp_page_is_free(virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(res)) cycle
164  swsusp_set_page_forbidden(virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(res))
165  allocated_unsafe_pages++
166  res = get_zeroed_page(gfp_mask)
168  If res Then
169  swsusp_set_page_forbidden(virt_to_page(kaddr) returns a valid pointer if and only if* virt_addr_valid(kaddr) returns true.(res))
170  Each page frame allocated for creating the image is marked by setting the* corresponding bits in forbidden_pages_map and free_pages_map simultaneously
172  Return res
Caller
NameDescribe
__get_safe_page
chain_alloc
alloc_rtree_nodealloc_rtree_node - Allocate a new node and add it to the radix tree.* This function is used to allocate inner nodes as well as the* leave nodes of the radix tree. It also adds the node to the* corresponding linked list passed in by the *list parameter.
snapshot_read_nextsnapshot_read_next - Get the address to read the next image page from.*@handle: Snapshot handle to be used for the reading.* On the first call, @handle should point to a zeroed snapshot_handle* structure
prepare_imageprepare_image - Make room for loading hibernation image
snapshot_write_nextsnapshot_write_next - Get the address to store the next image page.*@handle: Snapshot handle structure to guide the writing.* On the first call, @handle should point to a zeroed snapshot_handle* structure