函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\snapshot.c Create Date:2022-07-27 11:01:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

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

函数原型:void swsusp_free(void)

返回类型:void

参数:

1469  如果非Set bits in this map correspond to the page frames the contents of which* should not be saved during the suspend.或非Set bits in this map correspond to free page frames. 则转到: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  循环
1484  如果fb_pfn小于fr_pfnfb_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  如果fr_pfn小于fb_pfnfr_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 fb_pfn不等于fr_pfn循环
1490  如果fr_pfn不等于Data types related to memory bitmapspfn_valid(fr_pfn)则
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  转到: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()
调用者
名称描述
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