Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:get_buffer - Get the address to store the next image data page.* Get the address that snapshot_write_next() should return to its caller to* write to.

Proto:static void *get_buffer(struct memory_bitmap *bm, struct chain_allocator *ca)

Type:void

Parameter:

TypeParameterName
struct memory_bitmap *bm
struct chain_allocator *ca
2542  pfn = memory_bm_rtree_next_pfn - Find the next set bit in a memory bitmap.*@bm: Memory bitmap.* Starting from the last returned position this function searches for the next* set bit in @bm and returns the PFN represented by it. If no more bits are
2544  If pfn == Data types related to memory bitmaps Then Return ERR_PTR( - EFAULT)
2547  page = pfn_to_page(pfn)
2548  If PageHighMem(page) Then Return get_highmem_page_buffer(page, ca)
2551  If swsusp_page_is_forbidden(page) && swsusp_page_is_free(page) Then Return page_address(page)
2562  pbe = chain_alloc(ca, size of pbe )
2563  If Not pbe Then
2564  swsusp_free - Free pages allocated for hibernation image.* Image pages are alocated before snapshot creation, so they need to be* released after resume.
2565  Return ERR_PTR( - ENOMEM)
2567  riginal address of a page = page_address(page)
2568  address of the copy = List of "safe" pages (ie. pages that were not used by the image kernel* before hibernation) that may be used as temporary storage for image kernel* memory contents.
2569  List of "safe" pages (ie. pages that were not used by the image kernel* before hibernation) that may be used as temporary storage for image kernel* memory contents. = next
2570  next = List of PBEs needed for restoring the pages that were allocated before* the suspend and included in the suspend image, but have also been* allocated by the "resume" kernel, so their contents cannot be written* directly to their "original" page frames.
2571  List of PBEs needed for restoring the pages that were allocated before* the suspend and included in the suspend image, but have also been* allocated by the "resume" kernel, so their contents cannot be written* directly to their "original" page frames. = pbe
2572  Return address of the copy
Caller
NameDescribe
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