函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:hibernation_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.

函数原型:int hibernation_snapshot(int platform_mode)

返回类型:int

参数:

类型参数名称
intplatform_mode
356  pm_suspend_clear_flags()
357  error等于platform_begin - Call platform to start hibernation.*@platform_mode: Whether or not to use the platform driver.
358  如果error则转到:Close
362  error等于hibernate_preallocate_memory - Preallocate memory for hibernation image
363  如果error则转到:Close
366  error等于ze_kernel_threads - Make freezable kernel threads go to the refrigerator.* On success, returns 0. On failure, -errno and only the kernel threads are* thawed, so as to give a chance to the caller to do additional cleanups
367  如果error则转到:Cleanup
370  如果hibernation_test(TEST_FREEZER)则
376  freezer_test_done = true
377  转到:Thaw
380  error等于dpm_prepare(PMSG_FREEZE)
381  如果error
382  dpm_complete(PMSG_RECOVER)
383  转到:Thaw
386  Suspend and resume console messages over PM events
387  pm_restrict_gfp_mask()
389  error等于dpm_suspend(PMSG_FREEZE)
391  如果errorhibernation_test(TEST_DEVICES)则platform_recover - Recover from a failure to suspend devices.*@platform_mode: Whether or not to use the platform driver.
393  否则error等于reate_image - Create a hibernation image.*@platform_mode: Whether or not to use the platform driver.* Execute device drivers' "late" and "noirq" freeze callbacks, create a* hibernation image and run the drivers' "noirq" and "early" thaw callbacks.
403  如果error或非in_suspendswsusp_free()
406  msg等于如果in_suspend则如果errorPMSG_RECOVER否则PMSG_THAW否则PMSG_RESTORE
407  dpm_resume(msg)
409  如果error或非in_suspendpm_restore_gfp_mask()
412  resume_console()
413  dpm_complete(msg)
415  Close :
416  platform_end - Call platform to finish transition to the working state.*@platform_mode: Whether or not to use the platform driver.
417  返回:error
419  Thaw :
420  thaw_kernel_threads()
421  Cleanup :
422  swsusp_free()
423  转到:Close
调用者
名称描述
hibernatehibernate - Carry out system hibernation, including saving the image.
snapshot_ioctl