Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:swsusp_free - Free pages allocated for hibernation image.* Image pages are alocated before snapshot creation, so they need to be* released after resume.

Proto:void swsusp_free(void)

Type:void

Parameter:Nothing

1469  If Not Set bits in this map correspond to the page frames the contents of which* should not be saved during the suspend. || Not Set bits in this map correspond to free page frames. Then Go to out
1472  memory_bm_position_reset(Set bits in this map correspond to the page frames the contents of which* should not be saved during the suspend.)
1473  memory_bm_position_reset(Set bits in this map correspond to free page frames. )
1475  loop :
1476  fr_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
1477  fb_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
1483  Do
1484  If fb_pfn < fr_pfn Then fb_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
1486  If fr_pfn < fb_pfn Then fr_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
1488  When fb_pfn != fr_pfn cycle
1490  If fr_pfn != Data types related to memory bitmaps && pfn_valid(fr_pfn) Then
1491  page = pfn_to_page(fr_pfn)
1493  memory_bm_clear_current(Set bits in this map correspond to the page frames the contents of which* should not be saved during the suspend.)
1494  memory_bm_clear_current(Set bits in this map correspond to free page frames. )
1495  hibernate_restore_unprotect_page(page_address(page))
1496  __free_page(page)
1497  Go to loop
1500  out :
1501  Total number of image pages = 0
1502  Number of pages needed for saving the original pfns of the image pages = 0
1503  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. = NULL
1504  Pointer to an auxiliary buffer (1 page) = NULL
1505  Numbers of normal and highmem page frames allocated for hibernation image* before suspending devices. = 0
1506  Numbers of normal and highmem page frames allocated for hibernation image* before suspending devices. = 0
1507  hibernate_restore_protection_end()
Caller
NameDescribe
hibernation_snapshothibernation_snapshot - Quiesce devices and create a hibernation image.*@platform_mode: If set, use platform driver to prepare for the transition.* This routine must be called with system_transition_mutex held.
resume_target_kernelsume_target_kernel - Restore system state from a hibernation image
load_image_and_restore
hibernatehibernate - Carry out system hibernation, including saving the image.
hibernate_preallocate_memoryhibernate_preallocate_memory - Preallocate memory for hibernation image
swsusp_allocswsusp_alloc - Allocate memory for hibernation image
prepare_imageprepare_image - Make room for loading hibernation image
get_bufferget_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.
snapshot_release
snapshot_ioctl